1 /* $OpenBSD: spawn.c,v 1.11 2006/08/01 22:16:03 jason Exp $ */
3 /* This file is in the public domain. */
6 * Spawn. Actually just suspends Mg.
7 * Assumes POSIX job control.
16 * This causes mg to send itself a stop signal. It assumes the parent
17 * shell supports POSIX job control. If the terminal supports an alternate
18 * screen, we will switch to it.
22 spawncli(int f, int n)
26 /* Very similar to what vttidy() does. */
30 if (epresf != FALSE) {
34 if (ttcooked() == FALSE)
37 /* Exit application mode and tidy. */
40 (void)sigprocmask(SIG_SETMASK, NULL, &oset);
41 (void)kill(0, SIGTSTP);
42 (void)sigprocmask(SIG_SETMASK, &oset, NULL);