Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Signal (IPC)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Sending signals== The {{tt|[[Kill (command)|kill]](2)}} system call sends a specified signal to a specified process, if permissions allow. Similarly, the {{tt|[[kill (command)|kill(1)]]}} command allows a user to send signals to processes. The {{tt|raise(3)}} library function sends the specified signal to the current process. [[Exception handling|Exceptions]] such as [[division by zero]], [[segmentation violation]] ([[#SIGSEGV|SIGSEGV]]), and floating point exception ([[#SIGFPE|SIGFPE]]) will cause a [[core dump]] and terminate the program. The kernel can generate signals to notify processes of events. For example, [[#SIGPIPE|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 [[Pipeline (Unix)|shell pipelines]]. Typing certain key combinations at the [[Computer terminal|controlling terminal]] of a running process causes the system to send it certain signals:<ref>{{cite web |title=Termination Signals |url=https://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html |website=The GNU C Library)}}</ref> * [[Control-C|Ctrl-C]] (in older Unixes, DEL) sends an INT signal ("interrupt", [[#SIGINT|SIGINT]]); by default, this causes the process to terminate. * [[Ctrl-Z]] sends a TSTP signal ("terminal stop", [[SIGTSTP]]); by default, this causes the process to suspend execution.<ref>{{cite web |title=Job Control Signals |url=https://www.gnu.org/software/libc/manual/html_node/Job-Control-Signals.html |website=The GNU C Library}}</ref> * [[Control-\|Ctrl-\]] sends a QUIT signal ([[#SIGQUIT|SIGQUIT]]); by default, this causes the process to terminate and dump core. * [[Status key|Ctrl-T]] (not supported on all UNIXes) sends an INFO signal ([[#SIGINFO|SIGINFO]]); by default, and if supported by the command, this causes the operating system to show information about the running command.<ref>{{cite web |title=Miscellaneous Signals |url=https://www.gnu.org/software/libc/manual/html_node/Miscellaneous-Signals.html |website=The GNU C Library}}</ref> These default key combinations with modern operating systems can be changed with the {{tt|[[stty]]}} command.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)