version 1.107, 2001/10/10 22:18:47 |
version 1.108, 2001/10/11 13:45:21 |
|
|
*/ |
*/ |
if (close(s->ptymaster) < 0) |
if (close(s->ptymaster) < 0) |
error("close(s->ptymaster): %s", strerror(errno)); |
error("close(s->ptymaster): %s", strerror(errno)); |
|
|
|
/* unlink pty from session */ |
|
s->ttyfd = -1; |
} |
} |
|
|
static void |
static void |
|
|
} |
} |
debug("session_close_by_channel: channel %d child %d", id, s->pid); |
debug("session_close_by_channel: channel %d child %d", id, s->pid); |
if (s->pid != 0) { |
if (s->pid != 0) { |
/* delay detach */ |
|
debug("session_close_by_channel: channel %d: has child", id); |
debug("session_close_by_channel: channel %d: has child", id); |
|
/* |
|
* delay detach of session, but release pty, since |
|
* the fd's to the child are already closed |
|
*/ |
|
if (s->ttyfd != -1) { |
|
fatal_remove_cleanup(session_pty_cleanup, (void *)s); |
|
session_pty_cleanup(s); |
|
} |
return; |
return; |
} |
} |
/* detach by removing callback */ |
/* detach by removing callback */ |