From 03087e7a761df300c2d8cd6e072890f8e1059dfa Mon Sep 17 00:00:00 2001 From: John Hood Date: Wed, 10 Jul 2019 13:49:30 -0400 Subject: [PATCH] If exec()ing the remote command fails, pause briefly This makes the resulting error from mosh-server visible in ordinary usage. --- src/frontend/mosh-server.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend/mosh-server.cc b/src/frontend/mosh-server.cc index 4aa6d5fab..e8a6cb70f 100644 --- a/src/frontend/mosh-server.cc +++ b/src/frontend/mosh-server.cc @@ -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 */