search for: stdin_eof

Displaying 5 results from an estimated 5 matches for "stdin_eof".

2002 Feb 04
1
forkoff()
...ust exits. */ exit(0); } c = channel_lookup(session_ident); if (c == NULL) error("couldn't lookup session channel"); /* The child continues serving connections. */ /* fake EOF on stdin */ if (compat20) { buffer_append(&stdin_buffer, "\004", 1); } else if (!stdin_eof) { /* * Sending SSH_CMSG_EOF alone does not always appear * to be enough. So we try to send an EOF character * first. */ packet_start(SSH_CMSG_STDIN_DATA); packet_put_string("\004", 1); packet_send(); /* Close stdin. */ stdin_eof = 1; if (buffer_len(&stdin_b...
2002 Feb 01
1
FEATURE: -f -f - fork after successful open of fwd port/display/agent
.../ + exit(0); + } + + c = channel_lookup(session_ident); + if (c == NULL) + error("couldn't lookup session channel"); + + /* The child continues serving connections. */ + /* fake EOF on stdin */ + if (compat20) { + buffer_append(&stdin_buffer, "\004", 1); + } else if (!stdin_eof) { + /* + * Sending SSH_CMSG_EOF alone does not always appear + * to be enough. So we try to send an EOF character + * first. + */ + packet_start(SSH_CMSG_STDIN_DATA); + packet_put_string("\004", 1); + packet_send(); + /* Close stdin. */ + stdin_eof = 1; + if (buffer_len(&...
2002 Feb 05
0
New forkoff() and chan_wont_read/write() API
...ot;); + + /* Fork into background. */ + pid = fork(); + if (pid < 0) { + error("fork: %.100s", strerror(errno)); + return; + } + if (pid != 0) { /* This is the parent. */ + /* The parent just exits. */ + exit(0); + } + + /* fake EOF on stdin for SSHv1 */ + if (!compat20 && !stdin_eof) { + /* + * Sending SSH_CMSG_EOF alone does not always appear + * to be enough. So we try to send an EOF character + * first. + */ + packet_start(SSH_CMSG_STDIN_DATA); + packet_put_string("\004", 1); + packet_send(); + /* Close stdin. */ + stdin_eof = 1; + if (buffer_len(&...
2002 Jan 11
1
X11 forwarding, -f, error handling
I'd like a feature whereby ssh puts itself in the background after the first successful X11 (or other port) forwarding. The reason for this is simple: error handling. If the application fails to open the X display and exits, then the client can still exit with the application's exit code. But if the application opens the X display successfully, then it can just display any errors by
2001 Jul 09
1
sshd problem on Solaris 7: Control-C hangs shell
...the ssh session), sshd loops tighter, getting 0 all the time from the read(fdout). Hmm, more hacking... A horrible hack that seems to "fix" my problem is: --- /tmp/openssh-2.9p2/serverloop.c Sat Apr 14 02:28:03 2001 +++ serverloop.c Mon Jul 9 13:02:27 2001 @@ -74,4 +74,5 @@ static int stdin_eof = 0; /* EOF message received from client. */ static int fdout_eof = 0; /* EOF encountered reading from fdout. */ +static int fdout_maybe_eof = 0; static int fderr_eof = 0; /* EOF encountered readung from fderr. */ static int fdin_is_tty = 0; /* fdin points to a tty. */ @@ -107,6 +108,9 @@...