LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
 
LinkBack 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
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 10,003

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


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 06:17 PM.

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