diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-01-07 14:46:45 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-01-07 14:47:10 +0100 |
commit | da054c3782f25b3b18243f6c76dcfcf90ba70274 (patch) | |
tree | bdd7ff0dd86926246034081ec78071d88ad44d4d /src/machine/machinectl.c | |
parent | 5743a5852d2ab6ad7f589c255afcfdf523d60ba8 (diff) |
ptyfwd: simplify how we handle vhangups a bit
Diffstat (limited to 'src/machine/machinectl.c')
-rw-r--r-- | src/machine/machinectl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index 7e995cab68..be3896a19b 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -1240,13 +1240,14 @@ static int on_machine_removed(sd_bus *bus, sd_bus_message *m, void *userdata, sd if (*forward) { /* If the forwarder is already initialized, tell it to - * exit on the next hangup */ + * exit on the next vhangup(), so that we still flush + * out what might be queued and exit then. */ - r = pty_forward_set_repeat(*forward, false); + r = pty_forward_set_ignore_vhangup(*forward, false); if (r >= 0) return 0; - log_error_errno(r, "Failed to set repeat flag: %m"); + log_error_errno(r, "Failed to set ignore_vhangup flag: %m"); } /* On error, or when the forwarder is not initialized yet, quit immediately */ @@ -1341,7 +1342,7 @@ static int login_machine(int argc, char *argv[], void *userdata) { return log_error_errno(r, "Failed to run event loop: %m"); pty_forward_get_last_char(forward, &last_char); - machine_died = pty_forward_get_repeat(forward) == 0; + machine_died = pty_forward_get_ignore_vhangup(forward) == 0; forward = pty_forward_free(forward); |