Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Problems with trap handling?



Bart Schaefer wrote:

> This may be related to my "infinite loop" report:
> 
> function tst() {
>   trap return INT 
>   read -q xx'?Type ^C here: '
>   echo You should not see this.
> }
> 
> Execute in 3.1.6-dev-16 and type ^C.  Note that you don't leave the "read"
> prompt.  Type any plain character; now "read" returns, and the function
> aborts as if interrupted.

Completely different problem. No patch yet -- I'm not sure:

In this incanartion read ends up in read1char() which explicitly does
*not* stop if the read returns with errno==EINTR. So I guess someone
had a reason for doing this way.

We could either test retflag/breaks/contflag there or give it a flag
that says to stop in case of EINTR and which would be set by bin_read
(via getquery()).

Of course, there are also be other solutions...

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author