bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IFS clobbering


From: Eric Blake
Subject: Re: IFS clobbering
Date: Mon, 21 Nov 2011 06:59:55 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1

On 11/21/2011 06:53 AM, Andreas Schwab wrote:
>> No.  That's a bug in configure.ac for changing IFS in a non-portable
>> manner.
> 
> What about this:
> 
> $ printf "%s\n" AC_INIT 'x=$IFS; IFS=" "; sleep 5; IFS=$x' AC_OUTPUT > 
> configure.ac
> $ autoconf
> $ ./configure
> configure: creating ./config.status
> $ timeout -s 2 3 ./configure 
> ./configure: line 14: BASHOPTS: command not found

Ah, now you're on to something that I can agree probably could use some
help.  The code executed in any trap statement cannot know what state
IFS was in at the time the trap fired, and so your argument is that all
trap handlers should start out by re-initializing IFS to a known state
if they in turn rely on sane IFS.

We need to document this issue if we decide this is important enough to
fix in autoconf.  But a patch for this issue seems like a reasonable
improvement to me.  Would you like to help write one?

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]