Tuesday, June 5, 2012

Signal in Unix

The signal API function allows us to install a signal handler for a process.
the prototype of signal api function is defined as :

sighandler_t signal (int  signum, sighandler_t handler);
where signalhandler_t typedef is :
typedef void (*sighandler_t)(int);

signal handlers for a process can be of three different types. they can be ignored (via SIG_ING), the default handler for the particular signal type (SIG_DEF) or a user defined handler (install via signal).

* The first group (terminate Ex. SIGHUP, SIGINT) lists the signal whose default action is to terminate the process. The second group (ignore EX. SIGCHLD, SIGCLD) list the signals for which the default action is to ignore the signal. The third group (core EX. SIGQUIT, SIGILL) list those signal whose action is to both terminate the process and perform a core dump (generate a core dump file) . and finally the fourth group (stop SIGABRT, SIGIOT, SIGBUS) stop the process (suspend , rather than terminate).

No comments:

Post a Comment

Qualcomm Short Term

  113 is the SL. 1st Target by mid July.

Total Pageviews