Displaying 1 result from an estimated 1 matches for "sigblockall".
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add vfork support
...freejob(jp);
- sh_error("Cannot fork");
- }
if (pid == 0)
forkchild(jp, n, mode);
else
forkparent(jp, n, mode, pid);
+
return pid;
}
+struct job *vforkexec(union node *n, char **argv, const char *path, int idx)
+{
+ struct job *jp;
+ int pid;
+
+ jp = makejob(n, 1);
+
+ sigblockall(NULL);
+ vforked++;
+
+ pid = vfork();
+
+ if (!pid) {
+ forkchild(jp, n, FORK_FG);
+ sigclearmask();
+ shellexec(argv, path, idx);
+ /* NOTREACHED */
+ }
+
+ vforked = 0;
+ sigclearmask();
+ forkparent(jp, n, FORK_FG, pid);
+
+ return jp;
+}
+
/*
* Wait for job to finish.
*
@@ -1105,7 +11...