SIGHUP

SIGHUP

Infobox Computing signal
description = Hangup
action = Abnormal termination of the process

SIGHUP is a signal used on POSIX-compliant platforms, originally designed to notify processes of a serial line drop. SIGHUP is a symbolic constant defined in the header file signal.h.

History

Access to computer systems for many years consisted of connecting a terminal to a mainframe system via a serial line and the RS-232 protocol. For this reason, when a system of software interrupts, called signals, was being developed, a signal was designated for use on "Hangup".

SIGHUP would be sent to programs when the serial line was dropped, often because the connected user terminated the connection by hanging up the modem. The system would detect the line was dropped via the lost DCD "carrier detect" signal.

Signals have always been a convenient method of inter-process communication (IPC), but in early implementations there were no user-definable signals (such as the later additions of SIGUSR1 and SIGUSR2) that programs could intercept and interpret for their own purposes. For this reason, applications that did not require a controlling terminal, such as daemons, would "recycle" SIGHUP as a signal to re-read configuration files, or reinitialise. This convention survives to this day in packages such as Apache and Sendmail.

Modern usage

With the decline of access via serial line, the meaning of SIGHUP has changed somewhat on modern systems, often meaning a controlling pseudo or virtual terminal has been closed.

If the program receiving SIGHUP is a Unix shell, it will often intercept the signal and ensure all stopped programs are continued before sending the signal to child jobs.

The Single UNIX Specification describes a shell utility called nohup, which can be used as a wrapper to start a program immune to SIGHUP.

Different shells also have other methods of controlling and managing SIGHUP, such as the disown facility of GNU bash.

Details

Symbolic signal names are used because signal numbers can vary across platforms, but XSI-conformant systems allow the use of the numeric constant 1 to be used to indicate a SIGHUP, which the vast majority of systems in fact use.

SIGHUP can be handled. That is, programmers can define the action they want to occur upon receiving a SIGHUP, such as calling a function, ignoring it, or restoring the default action.

The default action on POSIX-compliant systems is an abnormal termination.

Etymology

"SIG" is a common prefix for signal names; "HUP" is a contraction of "hang up".

ee also

* Signal (computing)
* RS-232
* Computer terminal


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • SIGHUP — Описание: Потеря соединения с терминалом По умолчанию: завершение процесса коды SA SIGINFO (не имеет специфических кодов) В POSIX системах, SIGHUP  сигнал, посылаемый процессу для уведомления о потере соединения с управляющим терминалом …   Википедия

  • SIGHUP — Hangup Signal (Signal Nr. 1) unter X/Open, ATT und BSD UNIX ( >xedit /usr/include/signal.h) …   Acronyms

  • SIGHUP — Hangup Signal (Signal Nr. 1) unter X/Open, ATT und BSD UNIX ( >xedit /usr/include/signal.h) …   Acronyms von A bis Z

  • Nohup — est une commande Unix permettant de lancer un processus qui restera actif même après la déconnexion de l utilisateur l ayant initiée. Combiné à l esperluette qui permet le lancement en arrière plan, nohup permet donc de créer des processus s… …   Wikipédia en Français

  • nohup — est une commande Unix permettant de lancer un processus qui restera actif même après la déconnexion de l utilisateur l ayant initiée. Combiné à l esperluette qui permet le lancement en arrière plan, nohup permet donc de créer des processus s… …   Wikipédia en Français

  • TTY-абстракция — Стиль этой статьи неэнциклопедичен или нарушает нормы русского языка. Статью следует исправить согласно стилистическим правилам Википедии. У этого термина существуют и другие значения, см. Tty. Подсистема TTY, или TTY абстракция  это одна из …   Википедия

  • SIGUSR1 и SIGUSR2 — Описание: Сигналы определяемые пользователем По умолчанию: завершение процесса коды SA SIGINFO (не имеет специфических кодов) В POSIX системах, SIGUSR1 и SIGUSR2  пользовательские сигналы, которые могут быть использованы для… …   Википедия

  • nohup — is a POSIX command to ignore the HUP (hangup) signal, enabling the command to keep running after the user who issues the command has logged out. The HUP (hangup) signal is by convention the way a terminal warns depending processes of logout.… …   Wikipedia

  • Cron — is a time based scheduling service in Unix like computer operating systems. cron is short for chronograph . [ [http://drupal.org/node/937#cron Drupal Terminology Page] ] cron has been recreated several times in its history. Design cron is driven… …   Wikipedia

  • Hungarian Unix Portal — Since 2000 the Hungarian Unix Portal founded by Gabor Micsko aka. [http://hup.hu/user/1 trey] is the largest Hungarian UNIX/Linux/BSD system administrators webpage. On this page you can read news, get help in the forum, discuss the news, etc.HUP… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”