|
From: | Thomas Dickey |
Subject: | Re: [patch] fix building on nommu systems (no fork) |
Date: | Sun, 17 Jan 2010 17:07:22 -0500 (EST) |
On Sun, 17 Jan 2010, Mike Frysinger wrote:
one of the tests (ditto) uses fork() when it could just as easily use vfork --
it could (with a configure-check...)
it simply does an exec, and it already uses _exit --- a/test/ditto.c +++ b/test/ditto.c @@ -161,7 +161,7 @@ open_tty(char *path) failed(slave_name); } sprintf(s_option, "-S%s/%d", slave_name, aslave); - if (fork()) { + if (vfork() == 0) { execlp("xterm", "xterm", s_option, "-title", path, (char *) 0); _exit(0); } -mike
-- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net
[Prev in Thread] | Current Thread | [Next in Thread] |