Skip to content

child_process: stdout/stderr flaky on CentOS 5 #2563

Description

@Trott

This is currently (but hopefully not for long--I have a PR to fix it) the contents of test/parallel/test-process-argv-0.js:

'use strict';varutil=require('util');varpath=require('path');varassert=require('assert');varspawn=require('child_process').spawn;varcommon=require('../common');console.error('argv=%j',process.argv);console.error('exec=%j',process.execPath);if(process.argv[2]!=='child'){varchild=spawn(process.execPath,[__filename,'child'],{cwd: path.dirname(process.execPath)});varchildArgv0='';varchildErr='';child.stdout.on('data',function(chunk){childArgv0+=chunk;});child.stderr.on('data',function(chunk){childErr+=chunk;});child.on('exit',function(){console.error('CHILD: %s',childErr.trim().split('\n').join('\nCHILD: '));assert.equal(childArgv0,process.execPath);});}else{process.stdout.write(process.argv[0]);}

From time to time on CentOS 5 only, stderr and stdout from the child process stop working after the first line is written to stderr.

See, for example this centos5-32 test result or this centos5-64 test result.

See further discussion at #2541.

CentOS Project will support CentOS 5 until March 31, 2017.

Metadata

Metadata

Assignees

No one assigned

    Labels

    child_processIssues and PRs related to the child_process subsystem.invalidIssues and PRs that are invalid.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions