Bug 133837 - [Win] Avoid fork bomb during build
Summary: [Win] Avoid fork bomb during build
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Major
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-06-12 18:35 PDT by Brent Fulgham
Modified: 2014-06-12 18:54 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.55 KB, patch)
2014-06-12 18:42 PDT, Brent Fulgham
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>