[go: nahoru, domu]

Jump to content

SIGTERM

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by PanagosTheOther (talk | contribs) at 18:57, 19 May 2008 (→‎Usage: wikilinked init). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Template:Infobox Computing signal On POSIX-compliant platforms, SIGTERM is the signal sent to a process to request its termination. The symbolic constant for SIGTERM is defined in the header file signal.h. Symbolic signal names are used because signal numbers can vary across platforms, however on the vast majority of systems, SIGTERM is signal #15.

Etymology

SIG is a common prefix for signal names. TERM is an abbreviation for terminate.

Usage

SIGTERM is the default signal sent to a process by the kill or killall commands. It causes the termination of a process, but unlike the SIGKILL signal, it can be caught and interpreted (or ignored) by the process. Therefore, SIGTERM is more akin to asking a process to terminate nicely, allowing cleanup and closure of files. For this reason, on many Unix systems during shutdown, init issues SIGTERM to all processes that are not essential to powering off, waits a few seconds, and then issues SIGKILL to forcibly terminate other processes to allow the computer to halt.

Template:Computing signals