From 07cee4edee9c7e054d1f2deafd4fd47faf6f8deb Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 10 Sep 2006 23:38:02 +0300 Subject: [PATCH] sig_tstp: Use _exit() rather than exit(). --- src/osdep/signals.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/osdep/signals.c b/src/osdep/signals.c index 54412f0e..72bc31cc 100644 --- a/src/osdep/signals.c +++ b/src/osdep/signals.c @@ -78,7 +78,12 @@ sig_tstp(struct terminal *term) if (!fork()) { sleep(1); kill(pid, SIGCONT); - exit(0); + /* Use _exit() rather than exit(), so that atexit + * functions are not called, and stdio output buffers + * are not flushed. Any such things must have been + * inherited from the parent process, which will take + * care of them when appropriate. */ + _exit(0); } #endif raise(SIGSTOP);