LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-03-2010, 01:21 AM   #1
alpinist_dou
LQ Newbie
 
Registered: Feb 2010
Posts: 1

Rep: Reputation: 0
why the process cannot catch the HUP signal


i'm crazy for this problem.

i write one program,which can dynamiclly be configure by user,using signal SIGHUP.
if i start the program in console,it can works well.i.e,i send HUP signal to the process,it can be catched and load the configure file.

but,if the program is started from init shell script,in this way,the ppid of the program is 1,the process can not catch the HUP signal but other signal ,such as USR1,can be catched.

i don't know if i express clearly.i am not family with shell script.i don't know if it dues to starting from shell script.

can anyone help me?
 
Old 02-03-2010, 10:01 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by alpinist_dou View Post
i'm crazy for this problem.

i write one program,which can dynamiclly be configure by user,using signal SIGHUP.
if i start the program in console,it can works well.i.e,i send HUP signal to the process,it can be catched and load the configure file.

but,if the program is started from init shell script,in this way,the ppid of the program is 1,the process can not catch the HUP signal but other signal ,such as USR1,can be catched.

i don't know if i express clearly.i am not family with shell script.i don't know if it dues to starting from shell script.

can anyone help me?
Well, since you're not posting any of your program, shell-script, or giving us any details (like version/distro of Linux, etc.), it's doubtful. You don't even say what you've written this program IN, or what it does.
 
  


Reply

Tags
signal



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 07:26 AM
Why does rsyslogd die on HUP signal? mendalon Linux - Server 1 09-03-2009 01:54 AM
How to get the PID of the process giving kill signal to a process? hariprd Programming 2 11-27-2008 03:10 AM
What is hup signal? How to send one to squid? Niceman2005 Linux - Newbie 2 12-17-2004 07:37 PM
Does kill -HUP <id> restart the <id> process? feetyouwell Linux - Software 1 02-15-2004 10:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:51 PM.

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
Open Source Consulting | Domain Registration