Skip to content

Commit 79490b9

Browse files
committed
---
yaml --- r: 274861 b: refs/heads/stable c: 07638b9 h: refs/heads/master i: 274859: 194435f
1 parent be70620 commit 79490b9

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: a1c13d03a5bbbc99d595906e566912e0bad337b3
32+
refs/heads/stable: 07638b95cec645bf8f587eb7851412aa3cdf4995
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/bootstrap/build/job.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,20 @@ pub unsafe fn setup() {
6464
mem::size_of_val(&info) as DWORD);
6565
assert!(r != 0, "{}", io::Error::last_os_error());
6666

67-
// Assign our process to this job object
67+
// Assign our process to this job object. Note that if this fails, one very
68+
// likely reason is that we are ourselves already in a job object! This can
69+
// happen on the build bots that we've got for Windows, or if just anyone
70+
// else is instrumenting the build. In this case we just bail out
71+
// immediately and assume that they take care of it.
72+
//
73+
// Also note that nested jobs (why this might fail) are supported in recent
74+
// versions of Windows, but the version of Windows that our bots are running
75+
// at least don't support nested job objects.
6876
let r = AssignProcessToJobObject(job, GetCurrentProcess());
69-
assert!(r != 0, "{}", io::Error::last_os_error());
77+
if r == 0 {
78+
CloseHandle(job);
79+
return
80+
}
7081

7182
// If we've got a parent process (e.g. the python script that called us)
7283
// then move ownership of this job object up to them. That way if the python

0 commit comments

Comments
 (0)