Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaran.mccreesh@×××××××××××××.uk>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] has_version etc parallelisability
Date: Mon, 31 Dec 2007 14:33:41
Message-Id: 20071231142844.5e2a09aa@snowcone
In Reply to: Re: [gentoo-dev] has_version etc parallelisability by Alec Warner
1 On Sun, 30 Dec 2007 20:11:16 -0800
2 "Alec Warner" <antarus@g.o> wrote:
3 > On 12/30/07, Ciaran McCreesh <ciaran.mccreesh@×××××××××××××.uk> wrote:
4 > > Is it legal for ebuilds to call has_version and friends in
5 > > parallel? Is it legal for ebuilds to call has_version and friends
6 > > after the ebuild process has terminated? Discuss.
7 >
8 > If the pm implements read/write locking on the underlying datastore
9 > (which it should probably have regardless of this request) then I
10 > don't see a problem in parallel has_version calls.
11
12 Actually, it's the communication channel that's the issue... If, for
13 example, has_version is implemented in terms of a request on a pipe
14 rather than execing a new package manager, we get into messy bash
15 locking territory...
16
17 > I don't get your second example..do you mean the ebuild is running
18 > has_version in the background and then terminating?
19
20 Yeah. Again, consider the pipe example. If the package manager closes
21 off the pipe when it thinks the ebuild's done, calling has_version will
22 get the backgrounded process SIGPIPEd.
23
24 --
25 Ciaran McCreesh

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] has_version etc parallelisability Brian Harring <ferringb@×××××.com>