Gentoo Archives: gentoo-alt

From: Alan Hourihane <alanh@×××××××××××.uk>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] multilib / multijob / parallel build problem
Date: Mon, 07 Oct 2013 07:36:15
Message-Id: 5252646C.5000506@fairlite.co.uk
In Reply to: Re: [gentoo-alt] multilib / multijob / parallel build problem by Greg Turner
1 On 10/07/13 01:11, Greg Turner wrote:
2 > Alan wrote:
3 >> - redirect_alloc_fd mj_control_fd "${pipe}"
4 >> + redirect_alloc_fd mj_write_fd "${pipe}"
5 >> + redirect_alloc_fd mj_read_fd "${pipe}"
6 > The one thing I'd be looking to verify is that there's no race where
7 > where the reader must block before the writer starts producing data.
8 >
9 > You could test that hypothesis by sleeping for a while right before
10 > the reader starts listening.
11 >
12 > If that were the case -- I kinda suspect it is -- then unfortunately,
13 > I think the writer has to spin, waiting for the reader to block... not
14 > a pretty situation, so let's hope I'm confused.
15 >
16
17 I don't understand. There is no race, the above two commands just get
18 two different file descriptors for the read end and the write end. The
19 FIFO is opened in non-blocking IO mode anyway, as the FIFO is still
20 opened in read/write mode to get this behaviour. So the actual read from
21 one fd, and the write from another fd behaves no differently to reading
22 and writing from the same fd.
23
24 Alan.

Replies

Subject Author
Re: [gentoo-alt] multilib / multijob / parallel build problem Greg Turner <gmt@×××××.us>