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);