Skip to content

Commit 03087e7

Browse files
committed
If exec()ing the remote command fails, pause briefly
This makes the resulting error from mosh-server visible in ordinary usage.
1 parent 1219911 commit 03087e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/frontend/mosh-server.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,9 @@ static int run_server( const char *desired_ip, const char *desired_port,
599599
Crypto::reenable_dumping_core();
600600

601601
if ( execvp( command_path.c_str(), command_argv ) < 0 ) {
602-
err( 1, "execvp: %s", command_path.c_str() );
602+
warn( "execvp: %s", command_path.c_str() );
603+
sleep( 3 );
604+
exit( 1 );
603605
}
604606
} else {
605607
/* parent */

0 commit comments

Comments
 (0)