From 005bf4e445b2431518a4e636788471c4df390aca Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sun, 20 Jun 2021 13:45:29 -0400 Subject: Squashed 'bin/dash/' changes from a45870f7..efc7765b efc7765b Release 0.5.11.4. a5316982 eval: Do not cache value of eflag in evaltree 9e0f6a77 Release 0.5.11.3. 5f770b12 jobs: Only block in waitcmd on first run git-subtree-dir: bin/dash git-subtree-split: efc7765b5d7a4dcd23dbf8fbde35a843f5f222ca --- configure.ac | 2 +- src/eval.c | 12 ++---------- src/jobs.c | 4 +++- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 33f0b08c..d06b9044 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([dash],[0.5.11.2]) +AC_INIT([dash],[0.5.11.4]) AM_INIT_AUTOMAKE([foreign subdir-objects]) AC_CONFIG_SRCDIR([src/main.c]) diff --git a/src/eval.c b/src/eval.c index 1b5d61dc..d4190f95 100644 --- a/src/eval.c +++ b/src/eval.c @@ -245,18 +245,10 @@ evaltree(union node *n, int flags) popredir(0); goto setstatus; case NCMD: -#ifdef notyet - if (eflag && !(flags & EV_TESTED)) - checkexit = ~0; - status = evalcommand(n, flags, (struct backcmd *)NULL); - goto setstatus; -#else evalfn = evalcommand; checkexit: - if (eflag && !(flags & EV_TESTED)) - checkexit = ~0; + checkexit = ~flags & EV_TESTED; goto calleval; -#endif case NFOR: evalfn = evalfor; goto calleval; @@ -316,7 +308,7 @@ setstatus: out: dotrap(); - if (checkexit & status) + if (eflag && checkexit && status) goto exexit; if (flags & EV_EXIT) { diff --git a/src/jobs.c b/src/jobs.c index d4c13c0f..f30313be 100644 --- a/src/jobs.c +++ b/src/jobs.c @@ -81,6 +81,7 @@ #define DOWAIT_NONBLOCK 0 #define DOWAIT_BLOCK 1 #define DOWAIT_WAITCMD 2 +#define DOWAIT_WAITCMD_ALL 4 /* array of jobs */ static struct job *jobtab; @@ -615,7 +616,7 @@ waitcmd(int argc, char **argv) jp->waited = 1; jp = jp->prev_job; } - if (!dowait(DOWAIT_WAITCMD, 0)) + if (!dowait(DOWAIT_WAITCMD_ALL, 0)) goto sigout; } } @@ -1139,6 +1140,7 @@ static int dowait(int block, struct job *jp) pid = waitone(block, jp); rpid &= !!pid; + block &= ~DOWAIT_WAITCMD_ALL; if (!pid || (jp && jp->state != JOBRUNNING)) block = DOWAIT_NONBLOCK; } while (pid >= 0); -- cgit 1.4.1 low=1'>dtch.c (unfollow)
Commit message (Collapse)Author
2020-05-14Add hi rule for sh arithmetic expansionJune McEnroe
Shell highlighting is hopeless anyway but this makes it slightly less obviously broken.
2020-05-13Remove gpg symlink from NetBSD installJune McEnroe
2020-05-11Add AutonomousJune McEnroe
Why do the bad guys get a happy ending though?
2020-05-08Move keyboard layout into a .bundleJune McEnroe
Based on Workman.bundle. This seems to make it stick, though I don't want to speak too soon.
2020-05-07Remove mkshJune McEnroe
2020-05-07Emulate 1sh prompts in bashJune McEnroe
2020-05-07Update nvim MANPAGERJune McEnroe
Not sure when this was added. Has the advantage of working properly in more versions of man(1) it seems.
2020-05-06Post "casual update"June McEnroe
2020-05-06Remove bman functionJune McEnroe