Displaying 4 results from an estimated 4 matches for "waitproc".
2020 Mar 28
0
[klibc:update-dash] dash: jobs: Only clear gotsigchld when waiting for everything
...V doesn't have a non-blocking wait system call.  It does
- * have a SIGCLD signal that is sent to a process when one of it's
- * children dies.  The obvious way to use SIGCLD would be to install
- * a handler for SIGCLD which simply bumped a counter when a SIGCLD
- * was received, and have waitproc bump another counter when it got
- * the status of a process.  Waitproc would then know that a wait
- * system call would not block if the two counters were different.
- * This approach doesn't work because if a process has children that
- * have not been waited for, System V will send it a SIG...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add vfork support
...ld(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 +1152,7 @@ static int dowait(int block, struct job *jp)
 STATIC int
 waitproc(int block, int *status)
 {
-	sigset_t mask, oldmask;
+	sigset_t oldmask;
 	int flags = block == DOWAIT_BLOCK ? 0 : WNOHANG;
 	int err;
 
@@ -1119,8 +1166,7 @@ waitproc(int block, int *status)
 		if (err || (err = -!block))
 			break;
 
-		sigfillset(&mask);
-		sigprocmask(SIG_SETMASK, &mask...
2019 Jan 25
0
[klibc:update-dash] trap: Globally rename pendingsigs to pending_sig
...ions(+), 9 deletions(-)
diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c
index 5e080f6a..a2602bae 100644
--- a/usr/dash/jobs.c
+++ b/usr/dash/jobs.c
@@ -647,7 +647,7 @@ out:
 	return retval;
 
 sigout:
-	retval = 128 + pendingsigs;
+	retval = 128 + pending_sig;
 	goto out;
 }
 
@@ -1146,7 +1146,7 @@ waitproc(int block, int *status)
 		sigfillset(&mask);
 		sigprocmask(SIG_SETMASK, &mask, &oldmask);
 
-		while (!gotsigchld && !pendingsigs)
+		while (!gotsigchld && !pending_sig)
 			sigsuspend(&oldmask);
 
 		sigclearmask();
diff --git a/usr/dash/miscbltin.c b/usr/dash/mis...
2020 Mar 28
0
[klibc:update-dash] dash: trap: Globally rename pendingsigs to pending_sig
...ions(+), 9 deletions(-)
diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c
index c1f9688f..333a2a22 100644
--- a/usr/dash/jobs.c
+++ b/usr/dash/jobs.c
@@ -647,7 +647,7 @@ out:
 	return retval;
 
 sigout:
-	retval = 128 + pendingsigs;
+	retval = 128 + pending_sig;
 	goto out;
 }
 
@@ -1146,7 +1146,7 @@ waitproc(int block, int *status)
 		sigfillset(&mask);
 		sigprocmask(SIG_SETMASK, &mask, &oldmask);
 
-		while (!gotsigchld && !pendingsigs)
+		while (!gotsigchld && !pending_sig)
 			sigsuspend(&oldmask);
 
 		sigclearmask();
diff --git a/usr/dash/miscbltin.c b/usr/dash/mis...