diff --git a/src/frontend/mosh-server.cc b/src/frontend/mosh-server.cc index 69647ce..e87f996 100644 --- a/src/frontend/mosh-server.cc +++ b/src/frontend/mosh-server.cc @@ -231,7 +231,7 @@ void serve( int host_fd, Terminal::Complete &terminal, ServerConnection &network /* establish fd for shutdown signals */ int signal_fd = selfpipe_init(); if ( signal_fd < 0 ) { - perror( "selfpipe" ); + perror( "selfpipe_init" ); return; } diff --git a/src/frontend/stmclient.cc b/src/frontend/stmclient.cc index 5f8c33a..8569d0d 100644 --- a/src/frontend/stmclient.cc +++ b/src/frontend/stmclient.cc @@ -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 );