From 847bcb63b541e4fbbfa3dccfe3022745cbe9a06a Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 23 Sep 2015 22:18:22 -0500 Subject: Add xvfork() as a static inline and use it from various places. Note: vfork(), like fork(), can return -1 if too many processes, and we should notice and fail loudly. --- toys/posix/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/posix/time.c') diff --git a/toys/posix/time.c b/toys/posix/time.c index 70d2997e..b3cfd26b 100644 --- a/toys/posix/time.c +++ b/toys/posix/time.c @@ -28,7 +28,7 @@ void time_main(void) struct timeval tv, tv2; gettimeofday(&tv, NULL); - if (!(pid = xfork())) xexec(toys.optargs); + if (!(pid = xvfork())) xexec(toys.optargs); else { int stat; struct rusage ru; -- cgit v1.2.3