summaryrefslogtreecommitdiffstats
path: root/monitor.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2007-09-17 12:04:08 +1000
committerDamien Miller <djm@mindrot.org>2007-09-17 12:04:08 +1000
commit54fd7cf2db5327f304825e0f9aaf9af5a490a75f (patch)
tree37d1a37a4ff6a5a7b6e774937ba3703edca7bc1a /monitor.c
parent1d824ab2e72daf8563f6dc72f4b3638da3b91dce (diff)
- djm@cvs.openbsd.org 2007/09/04 03:21:03
[clientloop.c monitor.c monitor_fdpass.c monitor_fdpass.h] [monitor_wrap.c ssh.c] make file descriptor passing code return an error rather than call fatal() when it encounters problems, and use this to make session multiplexing masters survive slaves failing to pass all stdio FDs; ok markus@
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/monitor.c b/monitor.c
index 08c7ea3c..1fe1fb56 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor.c,v 1.91 2007/05/17 20:52:13 djm Exp $ */
+/* $OpenBSD: monitor.c,v 1.92 2007/09/04 03:21:03 djm Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -1314,8 +1314,9 @@ mm_answer_pty(int sock, Buffer *m)
mm_request_send(sock, MONITOR_ANS_PTY, m);
- mm_send_fd(sock, s->ptyfd);
- mm_send_fd(sock, s->ttyfd);
+ if (mm_send_fd(sock, s->ptyfd) == -1 ||
+ mm_send_fd(sock, s->ttyfd) == -1)
+ fatal("%s: send fds failed", __func__);
/* make sure nothing uses fd 0 */
if ((fd0 = open(_PATH_DEVNULL, O_RDONLY)) < 0)