summaryrefslogtreecommitdiffstats
path: root/src/shared/ptyfwd.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-02-07 17:15:20 +0100
committerLennart Poettering <lennart@poettering.net>2024-02-09 18:27:01 +0100
commitd7c37242583fcdea86913bc3feda0cca84407dda (patch)
treed968971901e9af4947e562e1d402634f9efa3a7c /src/shared/ptyfwd.h
parentptyfwd: simplify error handling in shovel() (diff)
downloadsystemd-d7c37242583fcdea86913bc3feda0cca84407dda.tar.xz
systemd-d7c37242583fcdea86913bc3feda0cca84407dda.zip
ptyfwd: automatically turn off tinting/window title logic on dumb terminals
If we are not talking to a reasonable terminal let's not try to set the window title or tint the background.
Diffstat (limited to 'src/shared/ptyfwd.h')
-rw-r--r--src/shared/ptyfwd.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/shared/ptyfwd.h b/src/shared/ptyfwd.h
index 3f0d7811a2..f87becd030 100644
--- a/src/shared/ptyfwd.h
+++ b/src/shared/ptyfwd.h
@@ -10,13 +10,17 @@
typedef struct PTYForward PTYForward;
typedef enum PTYForwardFlags {
- PTY_FORWARD_READ_ONLY = 1,
+ /* Only output to STDOUT, never try to read from STDIN */
+ PTY_FORWARD_READ_ONLY = 1 << 0,
/* Continue reading after hangup? */
- PTY_FORWARD_IGNORE_VHANGUP = 2,
+ PTY_FORWARD_IGNORE_VHANGUP = 1 << 1,
/* Continue reading after hangup but only if we never read anything else? */
- PTY_FORWARD_IGNORE_INITIAL_VHANGUP = 4,
+ PTY_FORWARD_IGNORE_INITIAL_VHANGUP = 1 << 2,
+
+ /* Don't tint the background, or set window title */
+ PTY_FORWARD_DUMB_TERMINAL = 1 << 3,
} PTYForwardFlags;
typedef int (*PTYForwardHandler)(PTYForward *f, int rcode, void *userdata);