Consultor Eletrônico



Kbase 20993: Why UNIX Systems Might Seem To Ignore SIGINT And SIGQUIT Signals In Background Process
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   07/02/2011
Status: Verified

GOAL:

Why UNIX systems might seem to ignore SIGINT and SIGQUIT signals in background process

GOAL:

Why do some processes ignore signals.

FACT(s) (Environment):

UNIX

FIX:

The primary distinguishing characteristics of a background process are:

-- No read access to the controlling terminal.

-- Conditional write access to the controlling terminal.

Interactive shells set the action for the signals INT and QUIT when they start background processes. This is necessary so that typing Ctrl-c in a foreground process will not cause the signal to terminate background processes as well. Interactive shells do not forward these signals to background processes.

By convention, many programs, including Progress, examine the initial action for these two signals in order to determine whether they are running in the background. Another part of this convention is that any child processes you create should have their initial actions for INT and QUIT set to ignore.

A TERM signal can be sent to background processes to stop them. It is treated the same as QUIT.