Penguin

Differences between current version and predecessor to the previous major change of SIGHUP.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 11 Last edited on Saturday, July 23, 2005 1:23:41 pm by AristotlePagaltzis
Older page: version 4 Last edited on Monday, November 11, 2002 11:05:48 pm by CraigBox Revert
@@ -1,9 +1,25 @@
-!!!Signal: Hangup 
+!!! Signal: Hangup 
  
-This signal is generated by the kernel when your controlling terminal goes away. Or, in simplier terms, when you close the Xterm, or hang up a modem. Since daemons run in the background and don't have a controlling terminal, they often use SIGHUP to signal that they should reread their configuration files. This can cause issues with some programs that work as both a daemon and an interactive program, such as fetchmail(1).  
-An example of a daemon that rereads it's configuration file on SIGHUP is init(1 ), the first process created (which is responsible for creating all other processes, like getty for logging in). If you edit /etc/ inittab, its configuration file, you can do 
+This signal is generated by the [Kernel] when your controlling terminal goes away to the terminals ProcessGroup . Or, in simplier terms, when you close the Xterm, or hang up a modem. Since daemons run in the background and don't have a controlling terminal, they often use [ SIGHUP] to signal that they should reread their configuration files. This can cause issues with some programs that work as both a daemon and an interactive program, such as fetchmail(1).  
+  
+An example of a daemon that rereads its configuration file on [ SIGHUP] is init(8 ), the first process created (which is responsible for creating all other processes, like getty for logging in). If you edit inittab(5) , its configuration file, you can do  
+  
+ <verbatim>  
  kill -HUP 1 
-and it will re-read the config file. 
+ </verbatim>  
+  
+ and it will re-read the config file (note that the correct way to do this is to use [telinit(8)]).  
+  
+To restart an inetd(8) service, you find its [PID] and send a [SIGHUP] to it:  
+  
+ <verbatim>  
+ kill -HUP $inetd_pid  
+ </verbatim>  
+  
+You can prevent a process from recieving a [SIGHUP] signal by using the command nohup(1), for example:  
+  
+ <verbatim>  
+ nohup wget http://www.example .com/ &  
+ </verbatim>  
  
-To restart an inetd (8 ) service , you send a hangup to inetd:  
- killall -HUP inetd  
+will run wget (1 ) detached from the terminal , so it won't recieve a [SIGHUP] when you disconnect. This is useful if a download is so large that you want to log out instead of waiting until it is complete. (The <tt>&</tt> is [Shell] lingo to put the command into the background so that you can do something else, such as, uh, logging out.)