This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Avoid busy loop in wordexp when substituted command closedits stdout


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]