LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 09-17-2004, 01:36 AM   #1
rajesh_b
Member
 
Registered: Sep 2004
Location: Hyderabad.
Posts: 83

Rep: Reputation: 15
Sending a signal to a process (Help me)


Hai,

I am intemediate linux programmer. In the part of one program, i have to send a signal notifiication to the parent process. The program is a daemon service, which reads the xml configuration file and transfers the file from one directory to another directory. These two directories are mentioned in the xml file. What is my problem is " the daemon must be restarted if this xml configuration file is changed/saved. And i know this can be done throug signal handling. How can i send the daemon process a signal when the xml file is modified "

Plz help me.
Thankx is advance.

Regards,
rajesh.
 
Old 09-17-2004, 02:30 AM   #2
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
is the problem that you don't know how to send a signal? (man kill)
or is the problem that you aren't sure how to know when the file was last modified? (man fcntl and check out part about async i/o signals).
 
Old 09-17-2004, 02:30 AM   #3
potetgull
LQ Newbie
 
Registered: Sep 2004
Distribution: openbsd 3.5-stable, freebsd 4.9, wintendo 2000
Posts: 2

Rep: Reputation: 0
from a shell it can be done as kill -signal_name <pid> or kill -signal_name <pid>

Some of the more commonly used signals:

1 HUP (hang up)
2 INT (interrupt)
3 QUIT (quit)
6 ABRT (abort)
9 KILL (non-catchable, non-ignorable kill)
14 ALRM (alarm clock)
15 TERM (software termination signal)

and -1 or -HUP usely nowadays mean *re-read your config file*

(shamelessly riped from the openbsd manual)
 
  


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
how a father process know which child process send the signal SIGCHLD icoming Programming 10 07-20-2010 08:26 AM
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 signal to thread waiting on pselect exedx Programming 4 03-22-2004 12:48 AM
INIT: Sending processes the TERM signal vicente Linux - Software 2 10-02-2001 09:35 PM


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

Main Menu
Advertisement
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