fix: disable SIGUSR1 when --inspect is disabled (#33188)

This commit is contained in:
Samuel Attard 2022-03-22 00:51:04 -07:00 committed by GitHub
parent 956406a193
commit 81318f0acc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 76 additions and 0 deletions

View file

@ -478,6 +478,12 @@ node::Environment* NodeBindings::CreateEnvironment(
node::EnvironmentFlags::kNoInitializeInspector;
}
if (!electron::fuses::IsNodeCliInspectEnabled()) {
// If --inspect and friends are disabled we also shouldn't listen for
// SIGUSR1
flags |= node::EnvironmentFlags::kNoStartDebugSignalHandler;
}
v8::TryCatch try_catch(isolate);
env = node::CreateEnvironment(
isolate_data_, context, args, exec_args,