Package: posh
Version: 0.7.1
Severity: normal

Hi,


[39]/tmp> cat test.sh
set -e
true; false && true
echo OK
[40]/tmp> posh test.sh ; echo exit status: $?
exit status: 1
[41]/tmp> mksh test.sh ; echo exit status: $?
OK
exit status: 0
[42]/tmp>

While working on integrating `set -e' from posh/mksh to pdksh,
I found that the *xerrok value is never used in posh. The following 
change from mksh seems to be missing:

@@ -430,7 +439,8 @@
        quitenv();              /* restores IO */
        if ((flags&XEXEC))
                unwind(LEXIT);  /* exit child */
-       if (rv != 0 && !(flags & XERROK)) {
+       if (rv != 0 && !(flags & XERROK)
+               && (xerrok == NULL || !*xerrok)) {
                if (Flag(FERREXIT))
                        unwind(LERROR);
                trapsig(SIGERR_);



Regards,
robert



-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.28vox
Locale: LANG=pl_PL, LC_CTYPE=pl_PL (charmap=ISO-8859-2)
Shell: /bin/sh linked to /bin/pdksh

Versions of packages posh depends on:
ii  debconf [debconf-2.0]         1.5.27     Debian configuration management sy
ii  libc6                         2.9-26     GNU C Library: Shared libraries

posh recommends no packages.

posh suggests no packages.

-- debconf information excluded



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to