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

See Also:

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
Comment 2 Brent Fulgham 2014-06-12 18:42:51 PDT
Created attachment 233021 [details]
Comment 3 Brent Fulgham 2014-06-12 18:54:14 PDT
Committed r169927: <http://trac.webkit.org/changeset/169927>