From 6ea832a20700f5282c08c70f38422c6ab290a0b5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 18 May 2011 01:07:31 +0200 Subject: exec: hangup/reset/deallocate VTs in gettys Explicitly disconnect all clients from a VT when a getty starts/finishes (requires TIOCVHANGUP, available in 2.6.29). Explicitly deallocate getty VTs in order to flush scrollback buffer. Explicitly reset terminals to a defined state before spawning getty. --- src/execute.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/execute.h') diff --git a/src/execute.h b/src/execute.h index 208fe4ad5e..4ed79f0d8b 100644 --- a/src/execute.h +++ b/src/execute.h @@ -123,6 +123,10 @@ struct ExecContext { char *tty_path; + bool tty_reset; + bool tty_vhangup; + bool tty_vt_disallocate; + /* Since resolving these names might might involve socket * connections and we don't want to deadlock ourselves these * names are resolved on execution only and in the child @@ -198,11 +202,12 @@ int exec_command_set(ExecCommand *c, const char *path, ...); void exec_context_init(ExecContext *c); void exec_context_done(ExecContext *c); void exec_context_dump(ExecContext *c, FILE* f, const char *prefix); +void exec_context_tty_reset(const ExecContext *context); int exec_context_load_environment(const ExecContext *c, char ***l); void exec_status_start(ExecStatus *s, pid_t pid); -void exec_status_exit(ExecStatus *s, pid_t pid, int code, int status, const char *utmp_id); +void exec_status_exit(ExecStatus *s, ExecContext *context, pid_t pid, int code, int status); void exec_status_dump(ExecStatus *s, FILE *f, const char *prefix); const char* exec_output_to_string(ExecOutput i); -- cgit v1.2.3-54-g00ecf