Commit 13140b8c authored by Niels Möller's avatar Niels Möller
Browse files

(do_eof): Signal EOF on the process' stdin.

Rev: src/server_session.c:1.74
parent e3040dde
......@@ -133,6 +133,16 @@ do_eof(struct ssh_channel *channel)
trace("server_session.c: do_eof\n");
if (session->pty)
/* Is there any better way to signal EOF on a pty? This is what
* emacs does. */
A_WRITE(&session->in->write_buffer->super,
ssh_format("%lc", /* C-d */ 4));
if (shutdown (session->in->fd, SHUT_WR) < 0)
werror("server_session.c: do_eof, shutdown failed, (errno = %i): %z\n",
errno, STRERROR(errno));
close_fd_nicely(session->in);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment