This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1184,6 +1184,8 @@ def bootstrap(args):
11841184 args = [build .bootstrap_binary ()]
11851185 args .extend (sys .argv [1 :])
11861186 env = os .environ .copy ()
1187+ # The Python process ID is used when creating a Windows job object
1188+ # (see src\bootstrap\src\utils\job.rs)
11871189 env ["BOOTSTRAP_PARENT_ID" ] = str (os .getpid ())
11881190 env ["BOOTSTRAP_PYTHON" ] = sys .executable
11891191 run (args , env = env , verbose = build .verbose , is_bootstrap = True )
Original file line number Diff line number Diff line change @@ -15,11 +15,12 @@ pub unsafe fn setup(build: &mut crate::Build) {
1515///
1616/// Most of the time when you're running a build system (e.g., make) you expect
1717/// Ctrl-C or abnormal termination to actually terminate the entire tree of
18- /// process in play, not just the one at the top . This currently works "by
18+ /// processes in play. This currently works "by
1919/// default" on Unix platforms because Ctrl-C actually sends a signal to the
20- /// *process group* rather than the parent process, so everything will get torn
21- /// down. On Windows, however, this does not happen and Ctrl-C just kills the
22- /// parent process.
20+ /// *process group* so everything will get torn
21+ /// down. On Windows, however, Ctrl-C is only sent to processes in the same console.
22+ /// If a process is detached or attached to another console, it won't receive the
23+ /// signal.
2324///
2425/// To achieve the same semantics on Windows we use Job Objects to ensure that
2526/// all processes die at the same time. Job objects have a mode of operation
You can’t perform that action at this time.
0 commit comments