From 4a29ab9d70a4987507380a8335e752015bca111a Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Wed, 7 Mar 2012 18:32:42 -0800 Subject: [PATCH] Fix comments, formatting, error message around use of selfpipe --- src/frontend/mosh-server.cc | 2 +- src/frontend/stmclient.cc | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) 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 );