OSDN Git Service

merge in oc-release history after reset to master
[android-x86/external-toybox.git] / toys / posix / xargs.c
index 8178bf0..b4cb80a 100644 (file)
@@ -111,6 +111,7 @@ void xargs_main(void)
   struct double_list *dlist = NULL, *dtemp;
   int entries, bytes, done = 0, status;
   char *data = NULL, **out;
+  pid_t pid;
 
   if (!(toys.optflags & FLAG_0)) TT.delim = '\n';
 
@@ -168,8 +169,7 @@ void xargs_main(void)
     for (dtemp = dlist; dtemp; dtemp = dtemp->next)
       handle_entries(dtemp->data, out+entries);
 
-    pid_t pid=xfork();
-    if (!pid) {
+    if (!(pid = XVFORK())) {
       xclose(0);
       open("/dev/null", O_RDONLY);
       xexec(out);