If exec()ing the remote command fails, pause briefly

This makes the resulting error from mosh-server visible in ordinary usage.
This commit is contained in:
John Hood
2019-07-10 13:49:30 -04:00
parent 12199114fe
commit 03087e7a76
+3 -1
View File
@@ -599,7 +599,9 @@ static int run_server( const char *desired_ip, const char *desired_port,
Crypto::reenable_dumping_core();
if ( execvp( command_path.c_str(), command_argv ) < 0 ) {
err( 1, "execvp: %s", command_path.c_str() );
warn( "execvp: %s", command_path.c_str() );
sleep( 3 );
exit( 1 );
}
} else {
/* parent */