| This function is a GNU extension,declared in the header file`string.h'. 
voidpsignal(intsignum,const char *message)
This function prints a message describing the signalsignumto the standard error output streamstderr; see section.If you callpsignalwith amessagethat is either a null pointer or an empty string,psignaljust prints the message corresponding tosignum,adding a trailing newline. If you supply a non-nullmessageargument,thenpsignalprefixes its output with this string. It adds a colon and a space character to separate themessagefrom the string corresponding tosignum. This function is a BSD feature,declared in the header file`signal.h'. sys_siglistwhich contains the messages for the various signal codes. This array exists on BSD systems,unlikestrsignal. 
 signalfunction. You can specify a built-in action (such as to ignore the signal),or you canestablish a handler. sigactionfacility. This section describes both facilities and gives suggestions on which to use when. 
 signalfunction provides a simple interface for establishing an action for a particular signal. The function and associated macros are declared in the header file`signal.h'. 
sighandler_t
This is the type of signal handler functions. Signal handlers take one integer argument specifying the signal number,and have return typevoid. So,you should define handler functions like this:void handler (int signum) { ... } (编辑:邯郸站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |