Bug 133837

Summary: [Win] Avoid fork bomb during build
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit Misc.Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Major CC: bfulgham, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Patch thorton: review+

Description Brent Fulgham 2014-06-12 18:35:44 PDT
In some build environments, bits of WebKit are built separately. This means that some items (like the Tools/Scripts) directory are not always present.

The "build-generated-files.sh" script used on Windows assumes the Tools directory always exists, and expects a valid return value from `num-cpus`.

When this script is not present, it passes the result of this failed call to the "make -j" invocation, resulting in a runaway set of forks (a "fork bomb").

This patch corrects this problem by hard-coding a reasonable number of processes to use when the 'num-cpus' call cannot be executed.
Comment 1 Brent Fulgham 2014-06-12 18:35:59 PDT
<rdar://problem/17296034>
Comment 2 Brent Fulgham 2014-06-12 18:42:51 PDT
Created attachment 233021 [details]
Patch
Comment 3 Brent Fulgham 2014-06-12 18:54:14 PDT
Committed r169927: <http://trac.webkit.org/changeset/169927>