Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-09-2009, 12:42 AM   #1
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
Registered: Dec 2008
Location: Atlanta, GA, USA
Distribution: Ubuntu
Posts: 135

Rep: Reputation: 26
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..



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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:36 PM.

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