Cygwin: signalfd: implement non-polling select
Allow the signal thread to recognize we're called in consequence of select on a signalfd. If the signal is part of the wait mask, don't call any signal handler and don't remove the signal from the queue, so a subsequent read (or sigwaitinfo/sigtimedwait) still gets the signal. Instead, just signal the event object at _cygtls::signalfd_select_wait for the thread running select. The addition of signalfd_select_wait to _cygtls unearthed the alignment problem of the context member again. To make sure this doesn't get lost, improve the related comment in the header file so that this (hopefully) doesn't get lost (again). Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@ -2651,6 +2651,7 @@ class fhandler_signalfd : public fhandler_base
|
||||
void __reg3 read (void *ptr, size_t& len);
|
||||
|
||||
int poll ();
|
||||
inline sigset_t get_sigset () const { return sigset; }
|
||||
|
||||
select_record *select_read (select_stuff *);
|
||||
select_record *select_write (select_stuff *);
|
||||
|
Reference in New Issue
Block a user