electron / electron/build-tools

Ctrl+C When Building on Windows Continues Building

Open
#232 1 comment 0 reactions 0 assignees View on GitHub
:beetle: bug windows
Dominant language
TypeScript
Stars
297
Forks
83
Avg merge
17h 23m
Merged PRs (30d)
15

Description

I think there's several layers to this one, having to do with child processes and all that jazz.

Issue is if you use `Ctrl+C` to try to end a `e build`, it will keep running, kind of. It will continue any tasks already created for Goma until that runs dry. Since `-j 200` is used with Goma, that means compilation can continue for 10 minutes after you tried to cancel the build.

The behavior if you run the raw `ninja -j 200 electron` command is that `Ctrl+C` ends the build with the message `ninja: build stopped: interrupted by user.`.

Interruption on Windows is really messed up, so there's probably a lot of moving parts to this one.

If you run `e-build.js` directly you get a little closer to it working. I was able to get the desired behavior by adding a `process.on("SIGINT", () => {})` handler, but I have no idea why that worked. I was originally adding it to log to see if it would be called - the log message was never called but the build ended as I wanted. It's almost as if adding that unhooked some other code, but in testing you can add as many `process.on` hooks for `SIGINT` as you want, so I don't know why an empty handler would change the behavior.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.