blob: 3e2abb286f14c5c2ec330f6382cb5ea6ccb7d7bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
$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;
|