This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Avoid busy loop in wordexp when substituted command closedits stdout
- From: Carlos O'Donell <carlos at systemhalted dot org>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 21 Jan 2013 11:04:17 -0500
- Subject: Re: [PATCH] Avoid busy loop in wordexp when substituted command closedits stdout
- References: <mvmobgivokb.fsf@hawking.suse.de>
On 01/21/2013 05:05 AM, Andreas Schwab wrote:
> Once we receive EOF from the command no further output is expected, so
> just block until the process dies instead of busy looping.
>
> Andreas.
>
> [BZ #15020]
> * posix/wordexp.c (exec_comm): Avoid busy loop when command has
> closed its stdout.
This looks good to me. I wondered if your example in #15020 was valid
given the restrictions placed upon wordexp by POSIX, but regardless
the code should be robust against EOF being returned and should not
needlessly enter a busy loop.
Cheers,
Carlos.