autoconf
[Top][All Lists]
Advanced

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

Re: [patch] remove config.status race condition


From: Pavel Roskin
Subject: Re: [patch] remove config.status race condition
Date: Fri, 23 Feb 2001 14:54:06 -0500 (EST)

> > Are you sure that $$ is always preserved across subshells? What it I
> > create conf$$ in a subshell but want to access it in the top level shell?
>
> Sorry, but I don't understand why you are referring to subshells here.
> If anyway we were actually playing with subshells, we'd be in trouble
> to have the subshell pass relevant information to the mother, who is
> the one who wants information.

Unless you are using files with known names.

> Please develop.

Maybe it's too primitive, but I hope you will get the idea:

(
# Do it in subshell to avoid saving all variables
cat >conf$$.c <<EOF
$1
EOF
CFLAGS="$CFLAGS -fnord"
LIBS="$LIBS -lol"
$CC $CFLAGS $LIBS -o conf$$ conf$$.c
./conf$$ >conf$$.val
rm -f conf$$ conf$$.c
)
ac_result=`cat conf$$.val`
rm -f conf$$.val

Regards,
Pavel Roskin




reply via email to

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