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

Can't kill child process #704

Closed
vojtajina opened this issue Sep 23, 2012 · 3 comments
Closed

Can't kill child process #704

vojtajina opened this issue Sep 23, 2012 · 3 comments

Comments

@vojtajina
Copy link

// node.js
var spawn = require('child_process').spawn;
var p = spawn('/usr/bin/firefox', ['http://localhost/']);

setTimeout(function() {
  p.kill();
}, 1000);

p.on('exit', function(code, signal) {
  // will never happen
});
@michaelklishin
Copy link
Contributor

Please be more specific. There is nothing in the travis CI env that traps signals so I doubt this can qualify as a travis issue. For questions, use the mailing list.

@stelcheck
Copy link

I seem to have a similar issue with https://travis-ci.org/TypeStrong/ts-node/builds/273609445; for what it is worth, switching the default shell used by node from sh to /bin/bash seems to have some impact: https://travis-ci.org/TypeStrong/ts-node/jobs/273612209

Is it possible that Travis does something special with sh?

@AlexWayfer
Copy link

😕

https://travis-ci.org/thomasfl/filewatcher/jobs/298238166

I'm spawning /home/travis/build/thomasfl/filewatcher/bin/filewatcher executable via Kernel#spawn, but it runs that executable through sh -c and returning this sh -c pid, which ignoring SIGHUP, SIGINT or SIGTERM on it and its child normal ruby process.

scztt added a commit to scztt/timemap that referenced this issue Nov 10, 2018
This may work around a problem where kill() does not work correctly in a travis context (travis-ci/travis-ci#704)
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

No branches or pull requests

4 participants