Match each function with one of the following

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: d SIGKILL, whose default actions cannot be changed. #include <signal.h> typedef void handler t(int) handler t *signal(int signum, handler t *handler) returns: ptr to previous handler if OK, SIG ERR on error (does not set errno) The signal function can change the action associated with a signal signum in one of three ways: ¯ ¯ ¯ If handler is SIG IGN, then signals of type signum are ignored. If handler is SIG DFL, then the action for signals of type signum reverts to the default action. Otherwise, handler is the address of a user-defined function, called a signal handler, that will be called whenever the process receives a signal of type signum. Changing the default action by passing the address of a handler to the signal function is known as installing the handler. The invocation of the handler is called catching the signal. The execution of the handler is referred to as handling the signal. When a process catches a signal of type , the handler installed for signal is invoked with a single integer argument set to . This argument allows the same handler function to catch different types o...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online