lkml.org 
[lkml]   [2020]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: I disabled more compiler warnings..
From
Date
On Tue, 2020-05-12 at 15:04 +0000, David Laight wrote:
> I think there were some sub-makes that were started with make
> instead of $(MAKE) so ended up creating a new job pipe.

Oh, yes, that will do it.

> Doesn't it do blocking reads with SIGCHLD enabled?

No, because it's racy (by itself).

> (or hopefully ppoll() to avoid the race)

GNU make uses pselect(), on systems that support it. On systems that
don't support pselect() it uses a trick I described in another email:
we dup() the FD, read() on the dup, then in the SIGCHLD handler we
close() the dup.

> Another option is for the 'parent' make to return (or not acquire)
> a job token for $(MAKE) commands.

It just feels cleaner to me to have the parent simply always take the
token, and leave it up to the child to put it back if appropriate,
rather than the parent putting it back.

Having the parent not acquire a token at all won't work; without
limiting sub-makes it means you might have 100's of them running at the
same time, even with -j2 or whatever.

> Or, require the sub-make acquire a token in order to exit.
> Then it can free the token when every job terminates.

I'm not sure I follow that?

\
 
 \ /
  Last update: 2020-05-12 18:56    [W:0.199 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site