aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar John Hood <cgull@glup.org>2019-07-10 13:49:30 -0400
committerGravatar John Hood <cgull@glup.org>2020-05-18 00:01:05 -0400
commit03087e7a761df300c2d8cd6e072890f8e1059dfa (patch)
tree2dc91726a85dd789abee412b807c4f0e9b418f18 /src
parent12199114fe4234f791ef4c306163901643b40538 (diff)
If exec()ing the remote command fails, pause briefly
This makes the resulting error from mosh-server visible in ordinary usage.
Diffstat (limited to 'src')
-rw-r--r--src/frontend/mosh-server.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/frontend/mosh-server.cc b/src/frontend/mosh-server.cc
index 4aa6d5f..e8a6cb7 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 */