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/xargs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/posix/xargs.c') diff --git a/toys/posix/xargs.c b/toys/posix/xargs.c index 8178bf0c..50c42620 100644 --- a/toys/posix/xargs.c +++ b/toys/posix/xargs.c @@ -168,7 +168,7 @@ void xargs_main(void) for (dtemp = dlist; dtemp; dtemp = dtemp->next) handle_entries(dtemp->data, out+entries); - pid_t pid=xfork(); + pid_t pid=xvfork(); if (!pid) { xclose(0); open("/dev/null", O_RDONLY); -- cgit v1.2.3