summaryrefslogtreecommitdiff
path: root/src/shared/ptyfwd.h
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-10-07 22:01:53 +0200
committerDaniel Mack <github@zonque.org>2015-10-07 22:01:53 +0200
commit8aec6ec510884cbcad7327bead40751ac1b8fd1b (patch)
treeffddfc96350cd8c6ac23a93245c89532f4e184a8 /src/shared/ptyfwd.h
parentc379f143a5ccdbc94a87cfca0174e7f21fa05f26 (diff)
parent42718282f5b545684ca1a4e3fd71f8c593d15f97 (diff)
Merge pull request #1490 from poettering/machinectl-shell-race-fix
machinectl shell race fix
Diffstat (limited to 'src/shared/ptyfwd.h')
-rw-r--r--src/shared/ptyfwd.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/shared/ptyfwd.h b/src/shared/ptyfwd.h
index 6f84e4036a..9b3214221b 100644
--- a/src/shared/ptyfwd.h
+++ b/src/shared/ptyfwd.h
@@ -27,7 +27,17 @@
typedef struct PTYForward PTYForward;
-int pty_forward_new(sd_event *event, int master, bool ignore_vhangup, bool read_only, PTYForward **f);
+typedef enum PTYForwardFlags {
+ PTY_FORWARD_READ_ONLY = 1,
+
+ /* Continue reading after hangup? */
+ PTY_FORWARD_IGNORE_VHANGUP = 2,
+
+ /* Continue reading after hangup but only if we never read anything else? */
+ PTY_FORWARD_IGNORE_INITIAL_VHANGUP = 4,
+} PTYForwardFlags;
+
+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);