LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-30-2008, 04:37 PM   #1
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Ubuntu, Mint
Posts: 939

Rep: Reputation: 38
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?
 
Old 01-30-2008, 05:07 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Mineral, Virginia
Distribution: Debian 8
Posts: 7,880

Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
Quote:
Originally Posted by SlowCoder View Post
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
 
Old 01-30-2008, 06:03 PM   #3
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Ubuntu, Mint
Posts: 939

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by jailbait View Post
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?
 
Old 01-30-2008, 06:20 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Mineral, Virginia
Distribution: Debian 8
Posts: 7,880

Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
Quote:
Originally Posted by SlowCoder View Post
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
 
Old 01-30-2008, 06:40 PM   #5
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Ubuntu, Mint
Posts: 939

Original Poster
Rep: Reputation: 38
Ok. Care to elaborate?
 
Old 01-30-2008, 07:08 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594
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.
 
Old 01-30-2008, 07:38 PM   #7
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Ubuntu, Mint
Posts: 939

Original Poster
Rep: Reputation: 38
Very nice. Thank you.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What if 'kill -9' fails to kill a task? chii-chan Linux - Newbie 15 03-27-2013 04:47 PM
Sending SIGHUP to inetd glansing Linux - Newbie 3 09-16-2005 03:13 AM
how to use kill to kill a batch of processes with same name? dr_zayus69 Linux - Software 2 09-03-2005 07:35 PM
cannot kill process (kill -9 does not work) mazer13a Linux - General 1 05-27-2005 03:32 PM
How inetd gets sighup? rajesh_b Programming 1 09-17-2004 05:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:54 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
Open Source Consulting | Domain Registration