This comment confuses me: "kill -l generally lists all signals". I thought that a signal means a quantized amount of energy.
[Added] Please, clarify the (computational) signal in Unix and the physical signal. Are they totally different concepts?
[Added] Are there major differences between paradigms? Is the meaning the same in languages such as C, Python and Haskell? The signal seems to be a general term.
In this case signal means 'message'. So it's sending a message to a process which can tell the process to do various things.
A unix signal is a kind of message that can be sent to and from unix processes. They can do things like tell a process to quit (SIGKILL) or that a process had an invalid memory reference (SIGSEGV) or that the process was killed by the user hitting control-c (SIGINT).
from a *nix command line type in:
that will should you all the signals available.
I cannot believe that people are not comparing things such as hardware and software or stressing OS at some points.
Comparison between a signal and an interrupt:
Definitions
Further reading
compare the signal to Interrupts and Exceptions
Tanenbaum's book Modern Operating Systems
A signal is a message which can be sent to a running process.
For example, to tell the Internet Daemon (inetd) to re-read its configuration file, it should be sent a SIGHUP signal.
For example, if the current process ID (PID) of inetd is 1234, you would type: kill -SIGHUP 1234
The manual refers to a very basic mechanism that allow processes or the operation system to notify other processes by sending a signal. The operation system can use it to notify programs about abortions of them (signal
SIGABRT
) or about a segmentation fault (often caused by accessing a null-pointer,SIGSEGV
), to name two of them.Some unix servers use signals so the administrator can use
kill
to send them a signal, causing them to re-read their configuration file, without requiring them to restart.There are default actions taken for some signals and other signals are just ignored. For example on receive of a
SIGSEGV
, the program terminates, while receiving aSIGCHLD
, meaning a child-process died, will by default result in nothing special.There is a ANSI C standard function that installs a signal handler, which is a function that can execute some code when receiving a signal, called
signal
(read inman signal
). In different unix's, that function behave different, so its usage is discouraged. Its manpage refers to thesigaction
function (readman sigaction
), which behaves consistent, and is also more powerful.