Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling ph.exit() doesn't terminate spawned process #24

Closed
ryanone opened this issue Dec 20, 2012 · 1 comment · May be fixed by #25
Closed

Calling ph.exit() doesn't terminate spawned process #24

ryanone opened this issue Dec 20, 2012 · 1 comment · May be fixed by #25

Comments

@ryanone
Copy link

ryanone commented Dec 20, 2012

Hi, has anyone else encountered this issue? I spawn one or more child processes (ie. PhantomJS instances). After opening up whatever web pages I need to open up, I naturally want to call exit(). However, this doesn't kill/terminate the child processes, and so I'm left with a bunch of orphans.

I've found what hopes to be a fix. Inside of node-phantom.js, we have a proxy variable at the bottom, which is an object with an exit() method. Right now, all it does is call request(). If we add a call to phantom.exit('SIGTERM'), that seems to do the trick.

I can send a pull request if you'd like.

Thanks!

@alexscheelmeyer
Copy link
Owner

Lets keep the discussion in the pull request.

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 a pull request may close this issue.

2 participants