diff options
Diffstat (limited to 'erts/emulator/sys')
-rw-r--r-- | erts/emulator/sys/unix/sys.c | 2 | ||||
-rw-r--r-- | erts/emulator/sys/vxworks/sys.c | 8 | ||||
-rw-r--r-- | erts/emulator/sys/win32/sys.c | 11 |
3 files changed, 20 insertions, 1 deletions
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c index 31ab5d03de..267f7d07aa 100644 --- a/erts/emulator/sys/unix/sys.c +++ b/erts/emulator/sys/unix/sys.c @@ -367,7 +367,7 @@ erts_sys_misc_mem_sz(void) /* * reset the terminal to the original settings on exit */ -void sys_tty_reset(void) +void sys_tty_reset(int exit_code) { if (using_oldshell && !replace_intr) { SET_BLOCKING(0); diff --git a/erts/emulator/sys/vxworks/sys.c b/erts/emulator/sys/vxworks/sys.c index abddc7e107..76689836b0 100644 --- a/erts/emulator/sys/vxworks/sys.c +++ b/erts/emulator/sys/vxworks/sys.c @@ -143,6 +143,14 @@ volatile int erts_break_requested; /********************* General functions ****************************/ +/* + * Reset the terminal to the original settings on exit + * (nothing to do for WxWorks). + */ +void sys_tty_reset(int exit_code) +{ +} + Uint erts_sys_misc_mem_sz(void) { diff --git a/erts/emulator/sys/win32/sys.c b/erts/emulator/sys/win32/sys.c index 3194493ac8..cfdfc6192a 100644 --- a/erts/emulator/sys/win32/sys.c +++ b/erts/emulator/sys/win32/sys.c @@ -187,6 +187,17 @@ erts_sys_misc_mem_sz(void) return res; } +/* + * Reset the terminal to the original settings on exit + */ +void sys_tty_reset(int exit_code) +{ + if (exit_code > 0) + ConWaitForExit(); + else + ConNormalExit(); +} + void erl_sys_args(int* argc, char** argv) { char *event_name; |