Fix comments, formatting, error message around use of selfpipe

This commit is contained in:
Keegan McAllister
2012-03-07 18:32:42 -08:00
parent e9cea2627e
commit 4a29ab9d70
2 changed files with 4 additions and 6 deletions
+3 -5
View File
@@ -104,16 +104,14 @@ void STMClient::shutdown( void )
void STMClient::main_init( void )
{
/* establish WINCH fd and start listening for signal */
/* establish a fd for signals */
signal_fd = selfpipe_init();
if ( signal_fd < 0 ) {
perror( "selfpipe" );
perror( "selfpipe_init" );
return;
}
assert( selfpipe_trap(SIGWINCH) == 0 );
/* establish fd for shutdown signals */
assert( selfpipe_trap( SIGWINCH ) == 0 );
assert( selfpipe_trap( SIGTERM ) == 0 );
assert( selfpipe_trap( SIGINT ) == 0 );
assert( selfpipe_trap( SIGHUP ) == 0 );