Skip to content

Script being kept alive #4

@oscar-broman

Description

@oscar-broman

The script doesn't exit automatically like it should when waitpid has been used. Commenting out the line that waits causes the script to run for 1 second then quit, as expected. With waitpid, however, the script just keeps running.

var waitpid = require('waitpid');
var childProcess = require('child_process');

var child = childProcess.spawn('sh', ['-c', 'sleep 1']);

console.log('waiting..');
waitpid(child.pid);
console.log('done waiting');

Tested with Node.js v0.10.4 on OS X and v0.10.7 on Debian 6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions