This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: Eliminate uses of "sleep" in V3 testsuite


On Wed, Jan 05, 2005 at 12:53:14PM +0100, Paolo Carlini wrote:

> Mark Mitchell wrote:
> 
> >So, Zack avoided the problem that the HP-UX kernel refuses to open a 
> >FIFO with O_WRONLY | O_TRUNC, but now we have a race condition. I 
> >think that the best solution is to remove the child process.  Thoughts?
> 
> Ok, now I see what you mean, and I agree with your analysis (but you are 
> using the technical terms "child" and "parent" rather unorthodoxly wrt 
> your book on Linux Programming ;) : what really count here, is that, 
> when an "ate" open fails, we close the fail and return error (i.e., 
> null). The other process is not doing anything useful.

But if there's a fifo with no reader, could open(name, O_WRONLY) block,
so we don't even get to the seek?

As Mark said, using a pipe would avoid these peculiarities of fifos, and
the child would be redundant.

jon

-- 
"I have had my results for a long time, but I do not yet know how I am
 to arrive at them."
	- Karl Friedrich Gauss


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