diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-12-23 23:25:49 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-02-02 20:59:43 +0100 |
commit | 9a1c8f2d2454ba5ccac4538137bc112d6fe6454f (patch) | |
tree | 2dd0043b23f08ce08a2eb550544cda36a85ccbbd | |
parent | 5b1bad8d45319f45e5679d5d47be74e43ee344d3 (diff) |
ptyfwd: set event source description strings for all event sources of a ptyfwd object
-rw-r--r-- | src/shared/ptyfwd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shared/ptyfwd.c b/src/shared/ptyfwd.c index 293c6673fc..3a02ae98dc 100644 --- a/src/shared/ptyfwd.c +++ b/src/shared/ptyfwd.c @@ -438,6 +438,9 @@ int pty_forward_new( r = sd_event_add_io(f->event, &f->stdin_event_source, STDIN_FILENO, EPOLLIN|EPOLLET, on_stdin_event, f); if (r < 0 && r != -EPERM) return r; + + if (r >= 0) + (void) sd_event_source_set_description(f->stdin_event_source, "ptyfwd-stdin"); } r = sd_event_add_io(f->event, &f->stdout_event_source, STDOUT_FILENO, EPOLLOUT|EPOLLET, on_stdout_event, f); @@ -446,15 +449,21 @@ int pty_forward_new( f->stdout_writable = true; else if (r < 0) return r; + else + (void) sd_event_source_set_description(f->stdout_event_source, "ptyfwd-stdout"); r = sd_event_add_io(f->event, &f->master_event_source, master, EPOLLIN|EPOLLOUT|EPOLLET, on_master_event, f); if (r < 0) return r; + (void) sd_event_source_set_description(f->master_event_source, "ptyfwd-master"); + r = sd_event_add_signal(f->event, &f->sigwinch_event_source, SIGWINCH, on_sigwinch_event, f); if (r < 0) return r; + (void) sd_event_source_set_description(f->sigwinch_event_source, "ptyfwd-sigwinch"); + *ret = f; f = NULL; |