$NetBSD: patch-ab,v 1.1.1.1 2012/07/20 03:15:29 agc Exp $ don't attempt to do weird things to stdio --- src/frontend/mosh-server.cc 2012/07/13 15:41:19 1.1 +++ src/frontend/mosh-server.cc 2012/07/13 15:44:09 @@ -361,9 +361,11 @@ /* close file descriptors */ if ( !verbose ) { /* Necessary to properly detach on old versions of sshd (e.g. RHEL/CentOS 5.0). */ +#if 0 fclose( stdin ); fclose( stdout ); fclose( stderr ); +#endif } /* Fork child process */ @@ -378,9 +380,11 @@ /* child */ /* reopen stdio */ +#if 0 stdin = fdopen( STDIN_FILENO, "r" ); stdout = fdopen( STDOUT_FILENO, "w" ); stderr = fdopen( STDERR_FILENO, "w" ); +#endif /* reenable signals */ struct sigaction sa;