… | |
… | |
441 | when you want to receive them. |
441 | when you want to receive them. |
442 | |
442 | |
443 | This behaviour is useful when you want to do your own signal handling, or |
443 | This behaviour is useful when you want to do your own signal handling, or |
444 | want to handle signals only in specific threads and want to avoid libev |
444 | want to handle signals only in specific threads and want to avoid libev |
445 | unblocking the signals. |
445 | unblocking the signals. |
|
|
446 | |
|
|
447 | It's also required by POSIX in a threaded program, as libev calls |
|
|
448 | C<sigprocmask>, whose behaviour is officially unspecified. |
446 | |
449 | |
447 | This flag's behaviour will become the default in future versions of libev. |
450 | This flag's behaviour will become the default in future versions of libev. |
448 | |
451 | |
449 | =item C<EVBACKEND_SELECT> (value 1, portable select backend) |
452 | =item C<EVBACKEND_SELECT> (value 1, portable select backend) |
450 | |
453 | |
… | |
… | |
2300 | =head3 The special problem of inheritance over fork/execve/pthread_create |
2303 | =head3 The special problem of inheritance over fork/execve/pthread_create |
2301 | |
2304 | |
2302 | Both the signal mask (C<sigprocmask>) and the signal disposition |
2305 | Both the signal mask (C<sigprocmask>) and the signal disposition |
2303 | (C<sigaction>) are unspecified after starting a signal watcher (and after |
2306 | (C<sigaction>) are unspecified after starting a signal watcher (and after |
2304 | stopping it again), that is, libev might or might not block the signal, |
2307 | stopping it again), that is, libev might or might not block the signal, |
2305 | and might or might not set or restore the installed signal handler. |
2308 | and might or might not set or restore the installed signal handler (but |
|
|
2309 | see C<EVFLAG_NOSIGMASK>). |
2306 | |
2310 | |
2307 | While this does not matter for the signal disposition (libev never |
2311 | While this does not matter for the signal disposition (libev never |
2308 | sets signals to C<SIG_IGN>, so handlers will be reset to C<SIG_DFL> on |
2312 | sets signals to C<SIG_IGN>, so handlers will be reset to C<SIG_DFL> on |
2309 | C<execve>), this matters for the signal mask: many programs do not expect |
2313 | C<execve>), this matters for the signal mask: many programs do not expect |
2310 | certain signals to be blocked. |
2314 | certain signals to be blocked. |