Signals

nehpets0701
2 min readSep 28, 2021

--

A list of the signals used in Linux

Signals in Linux, are standardized messages that can be sent to or from certain programs or processes in order to trigger a specific behavior. These behaviors can include but are not limited to things such as interrupting, terminating, killing, or quitting a program. They are a form of inter-process communication, or IPC for short. Signals exist because they can be very useful for several purposes. Firstly, they standardize many commonly executed processes, thus making them easier and faster. They also can work between multiple different processes and programs, which makes them useful so programs can talk to one another. Signals can be sent by a user or by any process or program and they can be sent in a variety of ways. The most common ways are either through the terminal or through a C system call. An example of a common use of a signal delivered through the keyboard would be when you press Control-C in a Linux terminal. This triggers an interrupt command (SIGINT), which will interrupt whatever process is currently running. The default process of this or when any signal is unhandled is to simply terminate the process. However, sometimes there is a signal handler. This means that signals can be caught and certain actions can be taken when a signal is received. These actions can be pretty much anything the programmer desires, which allows for some very interesting things to be done such as printing information from signals instead of just terminating a process. These are just a few of the great things that signals can do in Linux.

--

--

nehpets0701
nehpets0701

No responses yet