[CC-ing debian-devel to get more opinions]
On 10/06/2011 04:07 PM, Jonathan Nieder wrote:
>> ocamlbuild's logic is definitively incorrect, but I'm not sure if dash's
>> new behaviour is correct. "bash -c" doesn't skip fork() when a
>> redirection is set up, I guess for a reason. "dash -c" should probably
>> do the same for the same reason.
> Hold on a second. Dash is not supposed to be a bash emulator.
> ksh93 -c "/bin/sleep 100 >dev/null" does skip a fork(). I suspect
> bash does not skip a fork in this case for the same reason that
> bash -c 'echo hi; /bin/sleep 100'
> does not skip a fork.
POSIX's Shell and Utilities (XCU) 2.12  does say that "[the]
environment of the shell process shall not be changed by the utility",
and that environment includes open files. My understanding is that
dash's new behaviour (and incidentally, ksh93's one) is incorrect.
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org