Update comments on Windows job objects
This commit is contained in:
parent
a89f340efe
commit
898d75122f
2 changed files with 7 additions and 4 deletions
|
@ -1184,6 +1184,8 @@ def bootstrap(args):
|
||||||
args = [build.bootstrap_binary()]
|
args = [build.bootstrap_binary()]
|
||||||
args.extend(sys.argv[1:])
|
args.extend(sys.argv[1:])
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
|
# The Python process ID is used when creating a Windows job object
|
||||||
|
# (see src\bootstrap\src\utils\job.rs)
|
||||||
env["BOOTSTRAP_PARENT_ID"] = str(os.getpid())
|
env["BOOTSTRAP_PARENT_ID"] = str(os.getpid())
|
||||||
env["BOOTSTRAP_PYTHON"] = sys.executable
|
env["BOOTSTRAP_PYTHON"] = sys.executable
|
||||||
run(args, env=env, verbose=build.verbose, is_bootstrap=True)
|
run(args, env=env, verbose=build.verbose, is_bootstrap=True)
|
||||||
|
|
|
@ -15,11 +15,12 @@ pub unsafe fn setup(build: &mut crate::Build) {
|
||||||
///
|
///
|
||||||
/// Most of the time when you're running a build system (e.g., make) you expect
|
/// Most of the time when you're running a build system (e.g., make) you expect
|
||||||
/// Ctrl-C or abnormal termination to actually terminate the entire tree of
|
/// Ctrl-C or abnormal termination to actually terminate the entire tree of
|
||||||
/// process in play, not just the one at the top. This currently works "by
|
/// processes in play. This currently works "by
|
||||||
/// default" on Unix platforms because Ctrl-C actually sends a signal to the
|
/// default" on Unix platforms because Ctrl-C actually sends a signal to the
|
||||||
/// *process group* rather than the parent process, so everything will get torn
|
/// *process group* so everything will get torn
|
||||||
/// down. On Windows, however, this does not happen and Ctrl-C just kills the
|
/// down. On Windows, however, Ctrl-C is only sent to processes in the same console.
|
||||||
/// parent process.
|
/// If a process is detached or attached to another console, it won't receive the
|
||||||
|
/// signal.
|
||||||
///
|
///
|
||||||
/// To achieve the same semantics on Windows we use Job Objects to ensure that
|
/// To achieve the same semantics on Windows we use Job Objects to ensure that
|
||||||
/// all processes die at the same time. Job objects have a mode of operation
|
/// all processes die at the same time. Job objects have a mode of operation
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue