diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-02-08 01:54:12 +0100 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2016-09-04 12:31:06 +0200 |
commit | ec8febd9aef1f1ca8c35f6f0dc0a3b36f9dbc1e7 (patch) | |
tree | 09415c2f8d8aaac64bf3323edb1dc6209d669871 | |
parent | edb2947461fbea9b25a651afd1cf35dc49733ce6 (diff) |
boot: restore terminal state on exit
* boot/boot.c (host_exit): Make it a function and restore the terminal state.
-rw-r--r-- | boot/boot.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/boot/boot.c b/boot/boot.c index 462243c3..7f28f6b3 100644 --- a/boot/boot.c +++ b/boot/boot.c @@ -105,7 +105,13 @@ restore_termstate () #define host_fstat fstat typedef struct stat host_stat_t; -#define host_exit exit + +void __attribute__ ((__noreturn__)) +host_exit (int status) +{ + restore_termstate (); + exit (status); +} #endif /* UX */ |