summaryrefslogtreecommitdiff
path: root/src/shared/ptyfwd.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-08-17 14:24:17 +0200
committerLennart Poettering <lennart@poettering.net>2016-08-22 16:14:21 +0200
commit2a453c2ee3090e1942bfd962262f3eff0adbfa97 (patch)
treec4501111b1eb992309b6c4ceac9c39f5af8abc44 /src/shared/ptyfwd.h
parentfe700f46ec5490efcb8da49e644bb4d781f896f2 (diff)
run: optionally, wait for the service to finish and show its result
Diffstat (limited to 'src/shared/ptyfwd.h')
-rw-r--r--src/shared/ptyfwd.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/shared/ptyfwd.h b/src/shared/ptyfwd.h
index a046eb4e5e..bd5d5fec0d 100644
--- a/src/shared/ptyfwd.h
+++ b/src/shared/ptyfwd.h
@@ -37,12 +37,18 @@ typedef enum PTYForwardFlags {
PTY_FORWARD_IGNORE_INITIAL_VHANGUP = 4,
} PTYForwardFlags;
+typedef int (*PTYForwardHandler)(PTYForward *f, int rcode, void*userdata);
+
int pty_forward_new(sd_event *event, int master, PTYForwardFlags flags, PTYForward **f);
PTYForward *pty_forward_free(PTYForward *f);
int pty_forward_get_last_char(PTYForward *f, char *ch);
int pty_forward_set_ignore_vhangup(PTYForward *f, bool ignore_vhangup);
-int pty_forward_get_ignore_vhangup(PTYForward *f);
+bool pty_forward_get_ignore_vhangup(PTYForward *f);
+
+bool pty_forward_is_done(PTYForward *f);
+
+void pty_forward_set_handler(PTYForward *f, PTYForwardHandler handler, void *userdata);
DEFINE_TRIVIAL_CLEANUP_FUNC(PTYForward*, pty_forward_free);