windows: spawn process: close order shouldn't important #1438

Closed
geki007 opened this Issue Aug 2, 2011 · 3 comments

Comments

Projects
None yet
3 participants

geki007 commented Aug 2, 2011

here is the testcode (node 0.5.3):

var util  = require('util'),
    spawn = require('child_process').spawn,
    regedit    = spawn('regedit'),
    calc  = spawn('calc');

regedit.stdout.on('data', function (data) {
  console.log('regedit: stdout: ' + data);
});

regedit.stderr.on('data', function (data) {
  console.log('regedit: stderr: ' + data);
});

regedit.on('exit', function (code) {
  console.log('regedit: child process exited with code ' + code);
});



calc.stdout.on('data', function (data) {
  console.log('calc: stdout: ' + data);
});

calc.stderr.on('data', function (data) {
  console.log('calc: stderr: ' + data);
});

calc.on('exit', function (code) {
  console.log('calc: child process exited with code ' + code);
});

first test:

  • close regedit
  • look at console (no child process exited... output)
  • close calc
  • look at console (all 2 child process exited... lines are here) ... (order is lines is correct)

second test:

  • close calc
  • look at console (child process exited... output)
  • close regedit
  • look at console (child process exited... output)

i think also on the first test the first "child process exited..." line should be displayed after the close regedit

Member

piscisaureus commented Sep 5, 2011

I can confirm this. Milestone is v0.5.6.

Member

piscisaureus commented Sep 6, 2011

fixed-in-libuv: joyent/libuv@3d538af

This bug should be closed after the next libuv upgrade.

geki007 commented Sep 6, 2011

thank's

bnoordhuis closed this Sep 6, 2011

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