summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2018-10-04 00:10:11 +0000
committerDamien Miller <djm@mindrot.org>2018-10-04 10:44:49 +1000
commitf1dd179e122bdfdb7ca3072d9603607740efda05 (patch)
tree422eb37f82b6fd14e3f8f10668bc3cef8ea447e9 /session.c
parent2d1428b11c8b6f616f070f2ecedce12328526944 (diff)
upstream: include a little more information about the status and
disposition of channel's extended (stderr) fd; makes debugging some things a bit easier. No behaviour change. OpenBSD-Commit-ID: 483eb6467dc7d5dbca8eb109c453e7a43075f7ce
Diffstat (limited to 'session.c')
-rw-r--r--session.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/session.c b/session.c
index c5ca0556e..2d0958d11 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: session.c,v 1.306 2018/10/02 12:40:07 djm Exp $ */ 1/* $OpenBSD: session.c,v 1.307 2018/10/04 00:10:11 djm Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
@@ -2262,13 +2262,13 @@ void
2262session_pty_cleanup2(Session *s) 2262session_pty_cleanup2(Session *s)
2263{ 2263{
2264 if (s == NULL) { 2264 if (s == NULL) {
2265 error("session_pty_cleanup: no session"); 2265 error("%s: no session", __func__);
2266 return; 2266 return;
2267 } 2267 }
2268 if (s->ttyfd == -1) 2268 if (s->ttyfd == -1)
2269 return; 2269 return;
2270 2270
2271 debug("session_pty_cleanup: session %d release %s", s->self, s->tty); 2271 debug("%s: session %d release %s", __func__, s->self, s->tty);
2272 2272
2273 /* Record that the user has logged out. */ 2273 /* Record that the user has logged out. */
2274 if (s->pid != 0) 2274 if (s->pid != 0)
@@ -2479,7 +2479,8 @@ session_close_by_channel(struct ssh *ssh, int id, void *arg)
2479 } 2479 }
2480 debug("%s: channel %d child %ld", __func__, id, (long)s->pid); 2480 debug("%s: channel %d child %ld", __func__, id, (long)s->pid);
2481 if (s->pid != 0) { 2481 if (s->pid != 0) {
2482 debug("%s: channel %d: has child", __func__, id); 2482 debug("%s: channel %d: has child, ttyfd %d",
2483 __func__, id, s->ttyfd);
2483 /* 2484 /*
2484 * delay detach of session, but release pty, since 2485 * delay detach of session, but release pty, since
2485 * the fd's to the child are already closed 2486 * the fd's to the child are already closed