diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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 | |||
2262 | session_pty_cleanup2(Session *s) | 2262 | session_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 |