| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 3: Basic Library Functions Oracle Solaris 11 Information Library |
enable_extended_FILE_stdio(3C)
posix_spawnattr_getschedparam(3C)
posix_spawnattr_getschedpolicy(3C)
posix_spawnattr_getsigdefault(3C)
posix_spawnattr_getsigignore_np(3C)
posix_spawnattr_getsigmask(3C)
posix_spawnattr_setschedparam(3C)
posix_spawnattr_setschedpolicy(3C)
posix_spawnattr_setsigdefault(3C)
posix_spawnattr_setsigignore_np(3C)
posix_spawnattr_setsigmask(3C)
posix_spawn_file_actions_addclose(3C)
posix_spawn_file_actions_addclosefrom_np(3C)
posix_spawn_file_actions_adddup2(3C)
posix_spawn_file_actions_addopen(3C)
posix_spawn_file_actions_destroy(3C)
posix_spawn_file_actions_init(3C)
pthread_attr_getdetachstate(3C)
pthread_attr_getinheritsched(3C)
pthread_attr_getschedparam(3C)
pthread_attr_getschedpolicy(3C)
pthread_attr_setdetachstate(3C)
pthread_attr_setinheritsched(3C)
pthread_attr_setschedparam(3C)
pthread_attr_setschedpolicy(3C)
pthread_barrierattr_destroy(3C)
pthread_barrierattr_getpshared(3C)
pthread_barrierattr_setpshared(3C)
pthread_condattr_getpshared(3C)
pthread_condattr_setpshared(3C)
pthread_cond_reltimedwait_np(3C)
pthread_key_create_once_np(3C)
pthread_mutexattr_getprioceiling(3C)
pthread_mutexattr_getprotocol(3C)
pthread_mutexattr_getpshared(3C)
pthread_mutexattr_getrobust(3C)
pthread_mutexattr_setprioceiling(3C)
pthread_mutexattr_setprotocol(3C)
pthread_mutexattr_setpshared(3C)
pthread_mutexattr_setrobust(3C)
pthread_mutex_getprioceiling(3C)
pthread_mutex_reltimedlock_np(3C)
pthread_mutex_setprioceiling(3C)
pthread_rwlockattr_destroy(3C)
pthread_rwlockattr_getpshared(3C)
pthread_rwlockattr_setpshared(3C)
pthread_rwlock_reltimedrdlock_np(3C)
pthread_rwlock_reltimedwrlock_np(3C)
pthread_rwlock_timedrdlock(3C)
pthread_rwlock_timedwrlock(3C)
rctlblk_get_enforced_value(3C)
- simplified signal management for application processes
#include <signal.h>void(*signal(intsig,void (*disp)(int)))(int);
void (*sigset(intsig,void (*disp)(int)))(int);
intsighold(intsig);
intsigrelse(intsig);
intsigignore(intsig);
intsigpause(intsig);
These functions provide simplified signal management for application processes. Seesignal.h(3HEAD) foran explanation of general signal concepts.
Thesignal() andsigset() functions modify signal dispositions. Thesig argument specifiesthe signal, which may be any signal exceptSIGKILL andSIGSTOP. Thedisp argument specifies the signal's disposition, which may beSIG_DFL,SIG_IGN, orthe address of a signal handler. Ifsignal() is used,disp isthe address of a signal handler, andsig is notSIGILL,SIGTRAP,orSIGPWR, the system first sets the signal's disposition toSIG_DFL before executing the signal handler. Ifsigset() is used anddispis the address of a signal handler, the system addssig tothe calling process's signal mask before executing the signal handler; whenthe signal handler returns, the system restores the calling process's signal mask toits state prior to the delivery of the signal. In addition, ifsigset() is used anddisp is equal toSIG_HOLD,sig isadded to the calling process's signal mask and the signal's disposition remains unchanged.
Thesighold() function addssig to the calling process's signal mask.
Thesigrelse() function removessig from the calling process's signal mask.
Thesigignore() function sets the disposition ofsig toSIG_IGN.
Thesigpause() function removessig from the calling process's signal mask and suspends the calling process until a signal is received.
Upon successful completion,signal() returns the signal's previous disposition. Otherwise, it returnsSIG_ERR and setserrno to indicate the error.
Upon successful completion,sigset() returnsSIG_HOLD if the signal had been blockedor the signal's previous disposition if it had not been blocked. Otherwise,it returnsSIG_ERR and setserrno to indicate the error.
Upon successful completion,sighold(),sigrelse(),sigignore(), andsigpause(), return0. Otherwise,they return-1 and seterrno to indicate the error.
These functions fail if:
A signal was caught during the executionsigpause().
The value of thesig argument is not a valid signal or is equal toSIGKILL orSIGSTOP.
Thesighold() function used in conjunction withsigrelse() orsigpause() may beused to establish critical regions of code that require the delivery ofa signal to be temporarily deferred.
Ifsignal() orsigset() is used to setSIGCHLD's disposition toa signal handler,SIGCHLD will not be sent when the calling process'schildren are stopped or continued.
If any of the above functions are used to setSIGCHLD's dispositiontoSIG_IGN, the calling process's child processes will not create zombie processeswhen they terminate (seeexit(2)). If the calling process subsequently waits forits children, it blocks until all of its children terminate; it thenreturns-1 witherrno set toECHILD (seewait(3C) andwaitid(2)).
The system guarantees that if more than one instance of the samesignal is generated to a process, at least one signal will bereceived. It does not guarantee the reception of every generated signal.
Seeattributes(5) for descriptions of the following attributes:
|
exit(2),kill(2),pause(2),sigaction(2),sigsend(2),waitid(2),signal.h(3HEAD),wait(3C),attributes(5),standards(5)
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |