[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: sh -e changes broke pkgsrc
On Tue, May 27, 2008 at 10:12:41PM +0200, Matthias Drochner wrote:
> dholland-tech%NetBSD.org@localhost said:
> > > A subshell invocation is a command as any other.
> > So dsl is wrong? (I just want to be as clear as possible, since this
> > whole subject is extremely murky.)
> Yes, I think dsl is wrong in his response to bin/32282.
> I think that the "simple command" arguments are misleading,
> caused by poor wording in the POSIX spec.
> A "(do && some || stuff)" subshell invocation does its
> work on its own, and it can't be up to the outer shell
> to look into its innards. Just the exit status counts.
IIRC the shell specification I read doesn't mention the word
'subshell' when refering to (), instead it describes a second
'execution environment' and specifies what that environment
inherits from the original shell.
Since '-e' causes the shell to exit this would not depend on
which execution environment is actually executing the command. 
The other issue is that the rules for interactive shells differ,
as do those for soecial builtins (which are those commands executed
without fork(), so error exits tended to abort the entire shell).
 This is to allow 'sh' to run on system that don't have fork!
and is contrary to how all unix shells behave!
David Laight: david%l8s.co.uk@localhost
Main Index |
Thread Index |