Make Select a singleton

It's going to manipulate process-global signal state, so multiple
instances do not make sense.
This commit is contained in:
Keegan McAllister
2012-05-04 23:37:07 -04:00
committed by Keith Winstein
parent bb651581a7
commit 768d4ce797
9 changed files with 45 additions and 8 deletions
+1 -1
View File
@@ -479,7 +479,7 @@ void serve( int host_fd, Terminal::Complete &terminal, ServerConnection &network
fatal_assert( sigfd_trap( SIGINT ) == 0 );
/* prepare to poll for events */
Select sel;
Select &sel = Select::get_instance();
sel.add_fd( network.fd() );
sel.add_fd( host_fd );
sel.add_fd( signal_fd );