Skip to content

Conversation

@aslushnikov
Copy link
Contributor

Fixes #2053.

@aslushnikov
Copy link
Contributor Author

@alixaxel @JoelEinbinder can you guys please check if this works for you on win? Process management is not a well-tested area of ours.

@alixaxel
Copy link
Contributor

@aslushnikov I'm not a windows user.

@aslushnikov
Copy link
Contributor Author

@alixaxel oops, sorry for the noize.
cc @vsemozhetbyt

@vsemozhetbyt
Copy link
Contributor

@aslushnikov Can you provide some code I could test on Windows to be sure this fix the issue?

@aslushnikov
Copy link
Contributor Author

@vsemozhetbyt Try running the following script and then terminate running node.js program differently:

  • via taskmanager
  • via Ctrl-C
  • via closing the terminal

In all the cases, the spawned chromium instance should be closed.

var pptr = require('puppeteer');
(async() => {
  const browser = await pptr.launch();
  console.log('Launched!');
})();

@vsemozhetbyt
Copy link
Contributor

vsemozhetbyt commented Mar 7, 2018

@aslushnikov I can confirm that with this patch all three terminations of the running node.js program also close the spawned chromium instance on Windows 7 x64 with the cmd.exe shell.

@aslushnikov
Copy link
Contributor Author

@vsemozhetbyt: Thank you.

@JoelEinbinder, let's merge this?

@JoelEinbinder JoelEinbinder changed the title fix(Laucnher): do not detach child process on windows fix(Launcher): do not detach child process on windows Mar 15, 2018
@JoelEinbinder
Copy link
Contributor

I still get some errors when closing things on windows, but it actually closes things now so I'd say this is better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants