Hi list,

not sure whether I'm seeing pink elephants here, or whether this is
already documented somewhere in the autoconf manual.

TL;DR I have on Solaris 10:

  # "echo foo" not executed in case of failure?!
  $ cd /foo || echo foo
  /foo: does not exist

The gory details:

  [sol10:~]$ uname -a
  SunOS sol10 5.10 Generic_Virtual sun4v sparc sun4v
  [sol10:~]$ cat /etc/release
                     Oracle Solaris 10 1/13 s10s_u11wos_24a SPARC
    Copyright (c) 1983, 2025, Oracle and/or its affiliates. All rights reserved.
                              Assembled 17 January 2013

  [sol10:~]$ /bin/sh
  $ set +e                                      # rule out "set -e" interfering
  $ set -x

  $ cd /tmp && echo foo
  + cd /tmp
  + echo foo
  foo
  $ cd /tmp || echo foo
  + cd /tmp

  $ cd /foo && echo foo
  + cd /foo
  /foo: does not exist
  $ cd /foo || echo foo                         # this is the buggy one:
  + cd /foo                                     # "echo foo" not executed
  /foo: does not exist

  $ cd /var/sma_snmp || echo foo                # issue seems not related
  + cd /var/sma_snmp                            # to ENOENT
  /var/sma_snmp: permission denied

  $ if cd /foo; then echo yes; else echo no; fi # tri-state boolean?
  + cd /foo
  /foo: does not exist

  $ ( cd /foo ) || echo foo                     # wrapping into subshell
  + cd /foo                                     # helps, so exitval should
  /foo: does not exist                          # be OK
  + echo foo
  foo

Solaris 11 (tested on i86pc, not SPARC, though) behaves as expected
with respect to this.

What do you think about that one?  Is there anybody able to
reproduce this?

Thanks!


Reply via email to