[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: interrupt causes parse error in configure script
From: |
Jim Meyering |
Subject: |
Re: interrupt causes parse error in configure script |
Date: |
Mon, 18 Aug 2008 23:57:45 +0200 |
Ralf Wildenhues <address@hidden> wrote:
> Hello again,
>
> first, sorry for being a bit blunt earlier.
No apology needed ;-)
...
>> It appears that what Jim is seeing is that the shell (which one?)
>> catches the Ctrl-C, aborts the subshell, but then proceeds with
>> execution of the builtin test before quitting the script. In other
>> words, the Ctrl-C is not properly affecting the parent shell.
>
> ACK. I've tried some shells with your example:
>
>> I think we can factor it into a simpler testcase. I just tried this:
>>
>> $ sh -c 'if test `sleep 5; echo hi` = hi ; then echo yes; fi'
>
> and found only pdksh and OpenBSD sh (which is a pdksh descendant) to
> have this issue.
I'm pretty sure this happened with recent bash on my primary desktop
system. You can reproduce it with any shell like this:
if test `sleep 5 && echo f` = f; then echo yes; fi
Then kill the sleep process in under 5 seconds. I get parse
errors from the latest versions of bash, dash, and zsh.
So this *can* happen with other shells, if either the eval or
the $as_echo from the expansion of AS_VAR_GET fails.
Admittedly, this isn't the same as a simple ^C, so maybe
there's a race condition somewhere in there and the signal
has to hit a small window... or maybe it did happen on
some other type of system.
>> So it looks like my copy of ksh (pdksh 5.2.14) suffers from the bug.
>
>> > Beside, the AS_VAR_YES interface is ugly, but that's orthogonal.
>>
>> And based on the usage pattern, maybe an interface like this would be nicer:
>>
>> AS_VAR_IFELSE(var, [value = yes], if-true, if-false)
>
> Very good idea. Proposed patch below, for this and the documentation
> issue.
Nice! I prefer AS_VAR_IFELSE, too.
> What do you think about this patch (putting Eric and me in ChangeLog as
> co authors)?
Thanks for doing that.
You're welcome to push that, assuming there is no new test failure.
"make check" did pass for my patch.
- interrupt causes parse error in configure script, Jim Meyering, 2008/08/18
- Re: interrupt causes parse error in configure script, Ralf Wildenhues, 2008/08/18
- Re: interrupt causes parse error in configure script, Jim Meyering, 2008/08/18
- Re: interrupt causes parse error in configure script, Ralf Wildenhues, 2008/08/18
- Re: interrupt causes parse error in configure script, Jim Meyering, 2008/08/18
- Re: interrupt causes parse error in configure script, Ralf Wildenhues, 2008/08/18
- Re: interrupt causes parse error in configure script, Eric Blake, 2008/08/18
- Re: interrupt causes parse error in configure script, Paul Eggert, 2008/08/18
- Re: interrupt causes parse error in configure script, Jim Meyering, 2008/08/18
- Re: interrupt causes parse error in configure script, Ralf Wildenhues, 2008/08/18
- Re: interrupt causes parse error in configure script,
Jim Meyering <=
- Re: interrupt causes parse error in configure script, Ralf Wildenhues, 2008/08/19
- Re: interrupt causes parse error in configure script, Eric Blake, 2008/08/19
- Re: interrupt causes parse error in configure script, Ralf Wildenhues, 2008/08/19
- AS_IF failure, Eric Blake, 2008/08/19
- Re: AS_IF failure, Ralf Wildenhues, 2008/08/20
- Re: AS_IF failure, Eric Blake, 2008/08/20
- Re: AS_IF failure, Ralf Wildenhues, 2008/08/21
- Re: interrupt causes parse error in configure script, Jim Meyering, 2008/08/19
- Re: interrupt causes parse error in configure script, Eric Blake, 2008/08/18
- Re: interrupt causes parse error in configure script, Ralf Wildenhues, 2008/08/18