|
A signal is a limited form of inter-process communication used in Unix, Unix-like, and other POSIX-compliant operating systems. Essentially it is an asynchronous notification sent to a process in order to notify it of an event that occurred. When a signal is sent to a process, the operating system interrupts the processes' normal flow of execution. Execution can be interrupted during any non-atomic instruction. If the process has previously registered a signal handler, that routine is executed. Otherwise the default signal handler is executed. Inter-Process Communication (IPC) is a set of techniques for the exchange of data between two or more threads in one or more processes. ...
Filiation of Unix and Unix-like systems Unix (officially trademarked as UNIX®) is a computer operating system originally developed in the 1960s and 1970s by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy. ...
Diagram of the relationships between several Unix-like systems A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification. ...
POSIX or Portable Operating System Interface[1] is the collective name of a family of related standards specified by the IEEE to define the application programming interface (API) for software compatible with variants of the Unix operating system. ...
Asynchrony is the state of not being synchronized. ...
In computing, a process is an instance of a computer program that is being executed. ...
In computer science control flow (or alternatively, flow of control) refers to the order in which the individual statements or instructions of an imperative program are performed or executed. ...
In computer science, an atomic operation is an operation during which a processor can simultaneously read a location and write it in the same bus operation. ...
Sending signals - Typing certain combinations at the controlling terminal of a running process causes the system to send it certain signals:
- Ctrl-C (in older Unixes, DEL) sends an INT signal (SIGINT); by default, this causes the process to terminate.
- Ctrl-Z sends a TSTP signal (SIGTSTP); by default, this causes the process to suspend execution.
- Ctrl- sends a QUIT signal (SIGQUIT); by default, this causes the process to terminate and dump core.
- The kill(2) system call will send the specified signal to the process, if permissions allow. Similarly, the kill(1) command allows a user to send signals to processses.
- Exceptions such as division by zero or a segmentation violation will generate signals (here, SIGFPE and SIGSEGV respectively, which both cause a core dump by default).
- The kernel can generate a signal to notify the process of an event. For example, SIGPIPE will be generated when a process writes to a pipe which has been closed by the reader; by default, this causes the process to terminate, which is convenient when constructing shell pipelines.
In computing, control-C is a control character in ASCII code. ...
In UNIX and similar operating systems (such as Linux, BSD, OS-9 and UniFLEX) SIGINT stands for Signal Interrupt or Signal Interactive. ...
In computing, control-Z is a control character in ASCII code, also known as the substitute (SUB) character. ...
On POSIX compliant platforms, SIGTSTP is the symbolic name for the signal sent to a computer program by its controlling terminal when the user requests that it be suspended. ...
In computing, control- is a control character in ASCII code. ...
SIGQUIT is a symbolic signal name used on POSIX compliant platforms. ...
A core dump is the recorded state of the working memory of a computer program at a specific time, generally when the program has terminated abnormally (crashed). ...
In computing, a system call is the mechanism used by an application program to request service from the operating system. ...
Wikibooks has more about this subject: kill In Unix and Unix-like operating systems, kill is a command used to send simple messages to processes running on the system. ...
Exception may refer to: An action that is not part of normal operations or standards. ...
SIGFPE is the signal sent to computer programs that perform erroneous arithmetic operations on POSIX compliant platforms. ...
On POSIX compliant platforms, SIGSEGV is the symbolic name for the signal thrown by computer programs making invalid memory references. ...
UNIX supports the principle of piping, which allows processes to send data to other processes without the need for creating temporarily files. ...
In Unix and other Unix-like operating systems, a pipeline is a set of processes chained by their standard streams, so that the output of each process (stdout) feeds directly as input (stdin) of the next one. ...
Handling signals Signal handlers can be installed with the signal() system call. If a signal handler is not installed for a particular signal, the default handler is used. Otherwise the signal is intercepted and the signal handler is invoked. The process can also specify two default behaviors, without creating a handler: ignore the signal (SIG_IGN) and use the default signal handler (SIG_DFL). There are two signals which cannot be intercepted and handled: SIGKILL and SIGSTOP. The int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact) function defined in #include <signal. ...
In Unix and similar operating systems (such as Linux, BSD, OS-9 and UniFLEX) SIGKILL stands for Signal Kill. ...
SIGSTOP is a kernel-level signal. ...
Signal handling is vulnerable to race conditions. Because signals are asynchronous, another signal (even of the same type) can be delivered to the process during execution of the signal handling routine. The sigprocmask() call can be used to block and unblock delivery of signals. A race condition or race hazard is a flaw in a system or process whereby the output of the process is unexpectedly and critically dependent on the sequence or timing of other events. ...
This article or section does not cite any references or sources. ...
Signals can cause the interruption of a system call in progress, leaving it to the application to manage a non-transparent restart. PCLSRing is the term used in the ITS operating system for a consistency principle in the way one process accesses the state of another process. ...
List of signals The Single Unix Specification specifies the following signals which are defined in <signal.h>: The Single UNIX Specification (SUS) is the collective name of a family of standards for computer operating systems to qualify for the name Unix. The SUS is developed and maintained by the Austin Group, based on earlier work by the IEEE and The Open Group. ...
. The initial letter is shown capitalized due to technical restrictions. ...
- SIGABRT - process aborted
- SIGALRM - signal raised by alarm
- SIGBUS - bus error: "access to undefined portion of memory object"
- SIGCHLD - child process terminated, stopped (*or continued)
- SIGCONT - continue if stopped
- SIGFPE - floating point exception: "erroneous arithmetic operation"
- SIGHUP - hangup
- SIGILL - illegal instruction
- SIGINT - interrupt
- SIGKILL - kill
- SIGPIPE - write to pipe with no one reading
- SIGQUIT - quit
- SIGSEGV - segmentation violation
- SIGSTOP - stop executing temporarily
- SIGTERM - termination
- SIGTSTP - terminal stop signal
- SIGTTIN - background process attempting to read ("in")
- SIGTTOU - background process attempting to write ("out")
- SIGUSR1 - user defined 1
- SIGUSR2 - user defined 2
- *SIGPOLL - pollable event
- *SIGPROF - profiling timer expired
- *SIGSYS - bad syscall
- *SIGTRAP - trace/breakpoint trap
- SIGURG - urgent data available on socket
- *SIGVTALRM - signal raised by timer counting virtual time: "virtual timer expired"
- *SIGXCPU - CPU time limit exceeded
- *SIGXFSZ - file size limit exceeded
Note: Where a section is marked by an asterisk, this denotes an X/Open System Interfaces (XSI) extension. Wording in quotes appended with (SUS) denotes the wording from the SUS[1]. On POSIX compliant platforms, SIGABRT is the symbolic name for the signal thrown by computer programs to abort the process. ...
On POSIX compliant platforms, SIGALRM is the symbolic name for the signal thrown by computer programs when a time limit has elapsed. ...
For other uses, see Alarm (disambiguation). ...
SIGBUS is the symbolic name for the signal thrown by computer programs causing a bus error on POSIX compliant platforms. ...
On POSIX-compliant platforms, SIGCHLD is the signal thrown by computer programs when a child process terminates. ...
On POSIX-compliant platforms, SIGCONT is the signal sent to restart a computer program previously paused by the SIGSTOP signal. ...
SIGFPE is the signal sent to computer programs that perform erroneous arithmetic operations on POSIX compliant platforms. ...
SIGHUP is a symbolic signal name used on POSIX compliant platforms, originally designed to notify processes of a serial line drop. ...
SIGILL is the signal sent to computer programs that attempt to execute malformed, unknown, or privileged instructions on POSIX-compliant platforms. ...
In UNIX and similar operating systems (such as Linux, BSD, OS-9 and UniFLEX) SIGINT stands for Signal Interrupt or Signal Interactive. ...
In Unix and similar operating systems (such as Linux, BSD, OS-9 and UniFLEX) SIGKILL stands for Signal Kill. ...
UNIX supports the principle of piping, which allows processes to send data to other processes without the need for creating temporarily files. ...
SIGQUIT is a symbolic signal name used on POSIX compliant platforms. ...
On POSIX compliant platforms, SIGSEGV is the symbolic name for the signal thrown by computer programs making invalid memory references. ...
It has been suggested that Access violation be merged into this article or section. ...
SIGSTOP is a kernel-level signal. ...
On POSIX-compliant platforms, SIGTERM is the signal sent to computer programs to request termination. ...
On POSIX compliant platforms, SIGTSTP is the symbolic name for the signal sent to a computer program by its controlling terminal when the user requests that it be suspended. ...
On POSIX compliant platforms, SIGTTIN is the symbolic name for the signal thrown by computer programs that attempt to read from the tty while in the background. ...
On POSIX-compliant platforms, SIGTTOU is the signal thrown by computer programs that attempt to write to the tty while in the background. ...
On POSIX compliant platforms, SIGUSR1 is the symbolic name for a signal sent to computer programs to indicate a user-defined condition. ...
On POSIX compliant platforms, SIGUSR2 is the symbolic name for a signal sent to computer programs to indicate a user-defined condition. ...
On POSIX compliant platforms, SIGPOLL is the symbolic name for the signal thrown by computer programs when a user wishes to interrupt the process. ...
On POSIX-compliant platforms, SIGPROF is the signal thrown by computer programs when the profiling timer expires. ...
On POSIX compliant platforms, SIGSYS is the symbolic name for the signal thrown by computer programs when a bad argument is passed to a system call. ...
In computing, a system call is the mechanism used by an application program to request service from the operating system. ...
On POSIX compliant platforms, SIGTRAP is the symbolic name for the signal thrown by computer programs when a condition arises that a debugger has requested to be informed of. ...
It has been suggested that this article or section be merged into Exception handling. ...
On POSIX compliant platforms, SIGURG is the symbolic name for the signal thrown by computer programs when a socket has urgent data available to read. ...
On POSIX compliant platforms, SIGVTALRM is the symbolic name for the signal thrown by computer programs when a time limit has elapsed. ...
On POSIX compliant platforms, SIGXCPU is the symbolic name for the signal thrown by computer programs when they exceed their allotted ration of CPU time. ...
On POSIX compliant platforms, SIGXFSZ is the symbolic name for the signal thrown by computer programs that grow a file larger than the maximum allowed size. ...
External links |