devel: 'eval' returns 0 upon syntax error

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

devel: 'eval' returns 0 upon syntax error

Martijn Dekker
bash-snap-20170616

$ (eval '(');echo $?
bash: eval: line 2: syntax error: unexpected end of file
0

The exit status is 0, but should be 1.

As far as I can trace it, this bug seems to have been introduced in
bash-20170511 snapshot.

- M.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: devel: 'eval' returns 0 upon syntax error

Chet Ramey
On 6/18/17 8:06 PM, Martijn Dekker wrote:
> (eval '(');echo $?

Thanks for the report.  The parse error followed by EOF needs to call
YYABORT when the shell isn't reading input interactively.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [hidden email]    http://cnswww.cns.cwru.edu/~chet/

Loading...