Skip to content

Commit

Permalink
If exec()ing the remote command fails, pause briefly
Browse files Browse the repository at this point in the history
This makes the resulting error from mosh-server visible in ordinary usage.
  • Loading branch information
cgull committed Jul 10, 2019
1 parent b1da700 commit 471d2d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/frontend/mosh-server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 471d2d0

Please sign in to comment.