Imported Upstream version 0.5.10.1 upstream/0.5.10.1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Wed, 13 Oct 2021 01:49:43 +0000 (10:49 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Wed, 13 Oct 2021 01:49:43 +0000 (10:49 +0900)
configure
configure.ac
src/eval.c
src/jobs.c

index 7910897..d3cfda1 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dash 0.5.10.
+# Generated by GNU Autoconf 2.69 for dash 0.5.10.1.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='dash'
 PACKAGE_TARNAME='dash'
-PACKAGE_VERSION='0.5.10'
-PACKAGE_STRING='dash 0.5.10'
+PACKAGE_VERSION='0.5.10.1'
+PACKAGE_STRING='dash 0.5.10.1'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1269,7 +1269,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures dash 0.5.10 to adapt to many kinds of systems.
+\`configure' configures dash 0.5.10.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1335,7 +1335,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of dash 0.5.10:";;
+     short | recursive ) echo "Configuration of dash 0.5.10.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1440,7 +1440,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-dash configure 0.5.10
+dash configure 0.5.10.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2034,7 +2034,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by dash $as_me 0.5.10, which was
+It was created by dash $as_me 0.5.10.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2849,7 +2849,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='dash'
- VERSION='0.5.10'
+ VERSION='0.5.10.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5342,7 +5342,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by dash $as_me 0.5.10, which was
+This file was extended by dash $as_me 0.5.10.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5408,7 +5408,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-dash config.status 0.5.10
+dash config.status 0.5.10.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index c36f949..f700443 100644 (file)
@@ -1,4 +1,4 @@
-AC_INIT(dash, 0.5.10)
+AC_INIT(dash, 0.5.10.1)
 AM_INIT_AUTOMAKE([foreign subdir-objects])
 AC_CONFIG_SRCDIR([src/main.c])
 
index a27d657..39c4e41 100644 (file)
@@ -859,10 +859,8 @@ bail:
                if (!(flags & EV_EXIT) || have_traps()) {
                        INTOFF;
                        jp = makejob(cmd, 1);
-                       if (forkshell(jp, cmd, FORK_FG) != 0) {
-                               INTON;
+                       if (forkshell(jp, cmd, FORK_FG) != 0)
                                break;
-                       }
                        FORCEINTON;
                }
                listsetvar(varlist.list, VEXPORT|VSTACK);
@@ -875,11 +873,8 @@ bail:
                        if (execcmd && argc > 1)
                                listsetvar(varlist.list, VEXPORT);
                }
-               if (evalbltin(cmdentry.u.cmd, argc, argv, flags)) {
-                       if (exception == EXERROR && spclbltin <= 0) {
-                               FORCEINTON;
-                               break;
-                       }
+               if (evalbltin(cmdentry.u.cmd, argc, argv, flags) &&
+                   !(exception == EXERROR && spclbltin <= 0)) {
 raise:
                        longjmp(handler->loc, 1);
                }
@@ -892,6 +887,7 @@ raise:
        }
 
        status = waitforjob(jp);
+       FORCEINTON;
 
 out:
        if (cmd->ncmd.redirect)
index 1a97c54..606d603 100644 (file)
@@ -975,10 +975,17 @@ waitforjob(struct job *jp)
        int st;
 
        TRACE(("waitforjob(%%%d) called\n", jp ? jobno(jp) : 0));
-       while ((jp && jp->state == JOBRUNNING) || gotsigchld)
-               dowait(DOWAIT_BLOCK, jp);
-       if (!jp)
+       if (!jp) {
+               int pid = gotsigchld;
+
+               while (pid > 0)
+                       pid = dowait(DOWAIT_NORMAL, NULL);
+
                return exitstatus;
+       }
+
+       while (jp->state == JOBRUNNING)
+               dowait(DOWAIT_BLOCK, jp);
        st = getstatus(jp);
 #if JOBS
        if (jp->jobctl) {