execute: also hook up ansi-seq-based terminal size determination with exec_context_determine_size()

And while we are at it, merge exec_context_determine_tty_size() +
exec_context_apply_tty_size().

Let's simplify things, and merge the two funcs, since the latter just
does one more call.

At the same time, let's make sure we actually allow passing separate
input/output fds.
This commit is contained in:
Lennart Poettering
2024-07-19 11:44:04 +02:00
parent 967bcc6e26
commit 3f2e8e951a
3 changed files with 29 additions and 25 deletions
+1 -1
View File
@@ -526,7 +526,7 @@ int exec_context_get_clean_directories(ExecContext *c, char **prefix, ExecCleanM
int exec_context_get_clean_mask(ExecContext *c, ExecCleanMask *ret);
const char* exec_context_tty_path(const ExecContext *context);
int exec_context_apply_tty_size(const ExecContext *context, int tty_fd, const char *tty_path);
int exec_context_apply_tty_size(const ExecContext *context, int input_fd, int output_fd, const char *tty_path);
void exec_context_tty_reset(const ExecContext *context, const ExecParameters *p);
uint64_t exec_context_get_rlimit(const ExecContext *c, const char *name);