[Qt-interest] unix SIGUSR1 signal on QT

Bo Thorsen bo at fioniasoftware.dk
Thu Feb 10 11:44:49 CET 2011


Den 10-02-2011 11:31, Brian McGillion skrev:
> http://doc.qt.nokia.com/4.7-snapshot/unix-signals.html

That doesn't really answer the question, but it's good to know.

Gigin, the signals have nothing to do with Qt signals. You have to code 
it like you would in any other C or C++ project. Just be aware of the 
warning above: Don't call a Qt function or method while you are in the 
signal handler.

Bo Thorsen.

>> Hi, 
>> I am working on ARM based embedded target with linux 2.6.30.4. I am
>> sending a signal from C code as mentioned :
>>
>> kill(pidOf("main"),SIGUSR1); 
>> The function pidOf returns the process ID of a process running on the unix
>> machine. Whenever I execute my above code, it is sendinh signal to the
>> "main" program and I am getting the printf signal mentioned in the signal
>> handler of main program. The main.c is given below:void mysignal(int i
>> ){printf("Signal is Called\n");
>> }void main(){signal(SIGUSR1,mysignal);while(1) sleep(10);return;}
>>
>>
>> Is it possible that I can receive the same signal
>> (kill(pidOf("main"),SIGUSR1); ) from a QT application so that any given
>> slot is called once the signal is received.

Bo Thorsen,
Fionia Software.

-- 

Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk




More information about the Qt-interest-old mailing list