LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Sending signal from c program (http://www.linuxquestions.org/questions/linux-newbie-8/sending-signal-from-c-program-703248/)

ravisingla 02-08-2009 11:42 PM

Sending signal from c program
 
I tried to send SIGUSR1 signal to a process using
system("kill -SIGUSR1 1234"); where 1234 is pid of process
m getting error
kill: SIGUSR1: invalid signal specification
and signal is not sent to the process.
But If I run same command from konsole it is working fine??
can anyone suggest what going wrong??
Thanks in advance..
Ravi Singla

kauuttt 02-09-2009 03:13 AM

Use the following function to send the signal through C code
kill (int pid, int signal);

raise() will send a signal to the program that contains this raise() call..

Cheers-
kd


All times are GMT -5. The time now is 01:33 PM.