Displaying 4 results from an estimated 4 matches for "gotsig".
Did you mean:
gotoif
2019 Jan 25
0
[klibc:update-dash] trap: Globally rename pendingsigs to pending_sig
...+++ 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/miscbltin.c
index c47fdbf8..fc14dc4b 100644
--- a/usr/dash/miscbltin.c
+++ b/usr/dash/miscbltin.c
@@ -207,7 +207,7 @@ readcmd(i...
2020 Mar 28
0
[klibc:update-dash] dash: trap: Globally rename pendingsigs to pending_sig
...+++ 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/miscbltin.c
index c47fdbf8..fc14dc4b 100644
--- a/usr/dash/miscbltin.c
+++ b/usr/dash/miscbltin.c
@@ -207,7 +207,7 @@ readcmd(i...
2019 Jan 25
0
[klibc:update-dash] [TRAP] Make sure evalskip is zero before running traps
.../trap.c
index 182fa7ac..3ff45318 100644
--- a/usr/dash/trap.c
+++ b/usr/dash/trap.c
@@ -315,6 +315,9 @@ void dotrap(void)
int i;
int savestatus;
+ if (!pendingsigs)
+ return;
+
savestatus = exitstatus;
pendingsigs = 0;
barrier();
@@ -322,6 +325,12 @@ void dotrap(void)
for (i = 0, q = gotsig; i < NSIG - 1; i++, q++) {
if (!*q)
continue;
+
+ if (evalskip) {
+ pendingsigs = i + 1;
+ break;
+ }
+
*q = 0;
p = trap[i + 1];
@@ -329,8 +338,6 @@ void dotrap(void)
continue;
evalstring(p, 0);
exitstatus = savestatus;
- if (evalskip)
- break;
}
}
2020 Mar 28
0
[klibc:update-dash] dash: [TRAP] Make sure evalskip is zero before running traps
.../trap.c
index 182fa7ac..3ff45318 100644
--- a/usr/dash/trap.c
+++ b/usr/dash/trap.c
@@ -315,6 +315,9 @@ void dotrap(void)
int i;
int savestatus;
+ if (!pendingsigs)
+ return;
+
savestatus = exitstatus;
pendingsigs = 0;
barrier();
@@ -322,6 +325,12 @@ void dotrap(void)
for (i = 0, q = gotsig; i < NSIG - 1; i++, q++) {
if (!*q)
continue;
+
+ if (evalskip) {
+ pendingsigs = i + 1;
+ break;
+ }
+
*q = 0;
p = trap[i + 1];
@@ -329,8 +338,6 @@ void dotrap(void)
continue;
evalstring(p, 0);
exitstatus = savestatus;
- if (evalskip)
- break;
}
}