Re: bug: can't break/continue from within eval

2017-04-08 Thread Martijn Dekker
Op 08-04-17 om 02:08 schreef Chet Ramey: > On 4/7/17 7:46 PM, Thorsten Glaser wrote: >> Chet Ramey dixit: >> 'break' and 'continue' are POSIX "special builtins", meaning if they fail they should cause the shell to exit, at least in POSIX mode. >>> >>> Posix explicitly makes this case

Re: bug: can't break/continue from within eval

2017-04-07 Thread Thorsten Glaser
Chet Ramey dixit: >> 'break' and 'continue' are POSIX "special builtins", meaning if they >> fail they should cause the shell to exit, at least in POSIX mode. > >Posix explicitly makes this case unspecified. Indeed, I just found this out as well, thanks. I’m curious… is the 'break' in 'eval

Re: bug: can't break/continue from within eval (plus, status 0 on error)

2017-04-07 Thread Martijn Dekker
Op 08-04-17 om 00:36 schreef Chet Ramey: > On 4/7/17 6:56 PM, Martijn Dekker wrote: > >> A second thing: >> >> $ mksh -o posix -c 'break; echo $?' >> mksh: break: can't break >> 0 >> $ mksh -o posix -c 'continue; echo $?' >> mksh: continue: can't continue >> 0 >> >> 'break' and 'continue' are

Re: bug: can't break/continue from within eval (plus, status 0 on error)

2017-04-07 Thread Chet Ramey
On 4/7/17 6:56 PM, Martijn Dekker wrote: > A second thing: > > $ mksh -o posix -c 'break; echo $?' > mksh: break: can't break > 0 > $ mksh -o posix -c 'continue; echo $?' > mksh: continue: can't continue > 0 > > 'break' and 'continue' are POSIX "special builtins", meaning if they > fail they