LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-09-2009, 12:42 AM   #1
ravisingla
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Rep: Reputation: 0
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
 
Old 02-09-2009, 04:13 AM   #2
kauuttt
Member
 
Registered: Dec 2008
Location: Kolkata, India
Distribution: Ubuntu
Posts: 123

Rep: Reputation: 25
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending signal to child process DiAvOl Programming 6 05-16-2006 01:16 PM
Gtkmm - signal_button_press_event() not sending signal? matthurne Programming 1 12-19-2004 03:38 PM
Sending signal from one host to other zaheer031 Linux - Networking 1 11-04-2004 01:31 PM
Sending a signal to a process (Help me) rajesh_b Programming 2 09-17-2004 02:30 AM
Signal: 6 (Unknown Signal) - Problems running a program Faeroon Linux - Software 86 01-14-2003 01:08 AM


All times are GMT -5. The time now is 07:28 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration