Switch to pselect(2) and add signal handling to Select class

This commit is contained in:
Keegan McAllister
2012-05-05 02:01:18 -04:00
committed by Keith Winstein
parent 6edc04ed1c
commit 1d0b16881c
2 changed files with 94 additions and 13 deletions
+12
View File
@@ -21,3 +21,15 @@
Select *Select::instance = NULL;
fd_set Select::dummy_fd_set;
sigset_t Select::dummy_sigset;
void Select::handle_signal( int signum )
{
fatal_assert( signum >= 0 );
fatal_assert( signum <= MAX_SIGNAL_NUMBER );
Select &sel = get_instance();
sel.got_signal[ signum ] = 1;
sel.got_any_signal = 1;
}