A signal is a message that can be sent to a running process.Programs, users, or administrators can initiate signals.For example, the proper method of telling the Internet (inetd) to re-read its configuration file is to send it a SIGHUP signal.For example, if the current process ID (PID) of inetd is 4140, type: kill -SIGHUP 4140Another common use of signals is to stop a running process. To stop the inetd process completely, use this command: kill 4140By default, the kill command sends the SIGTERM signal.
If SIGTERM fails, escalate to using the SIGKILL signal to stop the process: kill -9 4140Because SIGKILL cannot be handled, stopping a process with SIGKILL is generally considered a bad idea. Using SIGKILL prevents a process from cleaning up after itself and exiting gracefully.Handling SignalsEach Unix signal has a default set of effects on a Unix program. Programmers can code their applications to respond in customized ways to most signals. These custom code pieces are called signal handlers.A signal handler is unable to redefine two signals. SIGKILL always stops a process and SIGSTOP always moves a process from the foreground to the background.
If it's received seven times or more within two seconds (say, if you hold it down continuously), it aborts the processing of any current jobs. 12,317 visited in past 24 hrs Big numbers 2,513,928 threads 59,043,421 posts 5,206,832 whims sent 4,766 wiki topics 1,818 modems & routers 80,280 features filled.
A signal handler cannot “catch” these two signals.