[Top][All Lists]

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

Re: [SCM] GNU Autoconf source repository branch, master, updated. v2.63b

From: Eric Blake
Subject: Re: [SCM] GNU Autoconf source repository branch, master, updated. v2.63b-69-g9a15f2f
Date: Wed, 08 Jul 2009 06:40:46 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090605 Thunderbird/ Mnenhy/

Hash: SHA1

According to Ralf Wildenhues on 7/7/2009 11:27 PM:
>> -     . "$at_test_source" # AT_JOB_FIFO_FD<&-
>> +     . "$at_test_source" # AT_JOB_FIFO_FD>&-
> This hunk is actually wrong, and I don't remember seeing it in the
> first iteration of your patch.  Of course, since it only changes a
> comment, it is not relevant.  However, you cannot close the fd for
> writing here, because a PIPE signal (that could happen within a test
> group for completely unrelated reasons) will cause the process to try
> to use it.  It's only the reading end that would be unused here (but
> of course the notation would close the fd for either use).

I agree that since it is in a comment, it makes no effect to the overall
testsuite, but I'm not quite sure that it is wrong.  POSIX allows either
n<&- or n>&- to close an fd, and requires that closing an fd be silent if
the fd is not open.  In other words, using <&- to close a write fd or >&-
to close a read fd is not wrong, just confusing when reading.  At any
rate, this line of code occurs inside the child subshell, where we have
already exec'd the fifo open for writes (and thus there is NO fd open for
reads), so if we were to uncomment this line, it makes more sense to use
the >&- notation than <&- to close the fd for consistency with the fact
that we know the fd would be open for writes at this point in the subshell.

> I think it's best to remove the comment, or change the trap to output
> to $at_job_fifo rather than the fd.  I haven't tried that, though.

OK, I see your point - if we were to uncomment that line, then the trap
should still be guaranteed that the fd is open or else write directly to
the fifo rather than to the fd.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


reply via email to

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