[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/51145: /bin/sh accepts '()' as a valid sub-shell
>Synopsis: /bin/sh accepts '()' as a valid sub-shell
>Arrival-Date: Mon May 16 03:25:00 +0000 2016
>Originator: Robert Elz
>Release: NetBSD 7.99.26 (all versions from historic until fixed)
System: NetBSD andromeda.noi.kre.to 7.99.26 NetBSD 7.99.26 (VBOX64-1.1-20160128) #43: Thu Jan 28 16:09:08 ICT 2016 kre%onyx.coe.psu.ac.th@localhost:/usr/obj/current/kernels/amd64/VBOX64 amd64
Note: this is related to (but perhaps not quite the same as)
( ... )
is supposed to contain a command list, and a command list
cannot be entirely empty (it can, for example, come close,
as wth ...
X= ; ( $X )
but that's not empty, it just evaluates to nothing, later...
/bin/sh (NetBSD) (and several other shells) does not object
to literally nothing (white space does not count) appearing
inside a sub-shell. bash, zsh (and even dash, which is derived
from NetBSD's shell, way back) do.
/bin/sh -c '()'
There should be an error, and non-zero exit code. There isn't.
To be investigated. The fix committed for 48489 does not fix
this one, which means that fix might get redone as well (if
it turns out that one fix can fix both.)
Main Index |
Thread Index |