Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
SIGHUP
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Modern usage== With the decline of access via serial line, the meaning of SIGHUP has changed somewhat on modern systems, often meaning a controlling [[Terminal emulator|pseudo or virtual terminal]] has been closed. If a command is executed inside a terminal window and the terminal window is closed while the command process is still running, it receives SIGHUP.<ref name="linux-signal7">{{Citation|chapter-url=https://www.kernel.org/doc/man-pages/online/pages/man7/signal.7.html|chapter=SIGNAL(7)|title=[[Linux Programmer's Manual]] (version 3.22)|editor-last=Kerrisk|editor-first=Michael|date=25 July 2009|publisher=The Linux Kernel Archives|access-date=23 September 2009}}.</ref> If the process receiving SIGHUP is a [[Unix shell]], then as part of [[Job control (Unix)|job control]] it will often intercept the signal and ensure that all stopped processes are continued before sending the signal to child processes (more precisely, [[process group]]s, represented internally by the shell as a "job"), which by default terminates them.<ref name="bash-beg">{{Citation|editor-last=Garrels|editor-first=Machtelt|title=Bash Guide for Beginners, ver. 1.11|chapter=Signals|date=27 December 2008|chapter-url=http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_12_01.html|publisher=[[The Linux Documentation Project]]|access-date=23 September 2009}}.</ref> This can be circumvented in two ways. Firstly, the [[Single UNIX Specification]] describes a shell utility called [[nohup]], which can be used as a wrapper to start a program and make it ignore SIGHUP by default. Secondly, child process groups can be "disowned" by invoking [[disown (Unix)|disown]] with the [[job id]], which removes the process group from the shell's job table (so they will not be sent SIGHUP), or (optionally) keeps them in the job table but prevents them from receiving SIGHUP on shell termination. Different shells also have other methods of controlling and managing SIGHUP, such as the [[disown (Unix)|disown]] facility of [[KornShell|ksh]]. Most modern [[Linux distribution]]s documentation specify using <code>[[kill (command)|kill]] -HUP <processID></code> to send the SIGHUP signal.<ref name="linux-kill2">{{Citation|chapter-url=https://www.kernel.org/doc/man-pages/online/pages/man2/kill.2.html|date=25 July 2009|chapter=KILL(2)|title=[[Linux Programmer's Manual]] (version 3.22)|editor-last=Kerrisk|editor-first=Michael|publisher=The Linux Kernel Archives|access-date=23 September 2009}}.</ref> [[Daemon (computing)|Daemon]] programs sometimes use SIGHUP as a signal to restart themselves, the most common reason for this being to re-read a configuration file that has been changed.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)