LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   SIGHUP / kill -1 (https://www.linuxquestions.org/questions/linux-general-1/sighup-kill-1-a-617481/)

SlowCoder 01-30-2008 03:37 PM

SIGHUP / kill -1
 
I was adjusting my sshd_config file remotely. When I executed "kill -1 [pid]", I remained connected through ssh.

Would my connection not be terminated?

jailbait 01-30-2008 04:07 PM

Quote:

Originally Posted by SlowCoder (Post 3040326)
I was adjusting my sshd_config file remotely. When I executed "kill -1 [pid]", I remained connected through ssh.

Would my connection not be terminated?

kill -1 does not kill the process issuing the kill command. To do that issue the exit command.

------------------
Steve Stites

SlowCoder 01-30-2008 05:03 PM

Quote:

Originally Posted by jailbait (Post 3040355)
kill -1 does not kill the process issuing the kill command. To do that issue the exit command.

------------------
Steve Stites

Right. It sends the SIGHUP signal, which from my reading means to reload. Does it not stop, then start the service, so that it rereads the config file?

jailbait 01-30-2008 05:20 PM

Quote:

Originally Posted by SlowCoder (Post 3040413)
Right. It sends the SIGHUP signal, which from my reading means to reload. Does it not stop, then start the service, so that it rereads the config file?

No.

---------------
Steve Stites

SlowCoder 01-30-2008 05:40 PM

Ok. Care to elaborate?

unSpawn 01-30-2008 06:08 PM

If the application understands it a SIGHUP will make the running process reread its configuration files in place. It hasn't got anything to do with init scripts.

SlowCoder 01-30-2008 06:38 PM

Very nice. Thank you.


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