Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: seg fault on $(dgqhghdqwdhqwjq) : beta19
- X-seq: zsh-workers 1184
- From: Thorsten Meinecke <kaefer@xxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: seg fault on $(dgqhghdqwdhqwjq) : beta19
- Date: Mon, 27 May 1996 04:38:55 +0200 (MET DST)
- In-reply-to: <199605270113.DAA01134@xxxxxxxxxxxxxxxxxxxx> from "Zoltan Hidvegi" at May 27, 96 03:13:45 am
- Organization: none. Location: Berlin, Germany
> > res1% $(wekdwqw)
> > zsh: command not found: wekdwqw
> > zsh: 21441 segmentation fault $(wekdwqw)
>
> It always happens when prefork() in execcmd() removes all arguments.
> Eg. $foo triggers the bug if foo is not set.
zsh's child dies in execute(), exec.c:243, when it tries to access
the empty argument list. But there's more to this than only that:
The exit code doesn't make sense when command substitution happens
in command position, eg.
% ./zsh -fc '$(true); echo $?'
139
% ./zsh -fc '$(false); echo $?'
139
Both bash and pd-ksh say `0' and '1' here, respectively. They both
give an exit code of `127' if the command isn't found. What's the
Right Thing?
Regards,
--Thorsten
Messages sorted by:
Reverse Date,
Date,
Thread,
Author