|
@ -269,6 +269,8 @@ |
|
|
// For supporting legacy API we put the FD here.
|
|
|
// For supporting legacy API we put the FD here.
|
|
|
stream.fd = fd; |
|
|
stream.fd = fd; |
|
|
|
|
|
|
|
|
|
|
|
stream._isStdio = true; |
|
|
|
|
|
|
|
|
return stream; |
|
|
return stream; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -278,14 +280,18 @@ |
|
|
process.__defineGetter__('stdout', function() { |
|
|
process.__defineGetter__('stdout', function() { |
|
|
if (stdout) return stdout; |
|
|
if (stdout) return stdout; |
|
|
stdout = createWritableStdioStream(1); |
|
|
stdout = createWritableStdioStream(1); |
|
|
stdout.end = stdout.destroy = stdout.destroySoon = function() { }; |
|
|
stdout.end = stdout.destroy = stdout.destroySoon = function() { |
|
|
|
|
|
throw new Error('process.stdout cannot be closed'); |
|
|
|
|
|
}; |
|
|
return stdout; |
|
|
return stdout; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
process.__defineGetter__('stderr', function() { |
|
|
process.__defineGetter__('stderr', function() { |
|
|
if (stderr) return stderr; |
|
|
if (stderr) return stderr; |
|
|
stderr = createWritableStdioStream(2); |
|
|
stderr = createWritableStdioStream(2); |
|
|
stderr.end = stderr.destroy = stderr.destroySoon = function() { }; |
|
|
stderr.end = stderr.destroy = stderr.destroySoon = function() { |
|
|
|
|
|
throw new Error('process.stderr cannot be closed'); |
|
|
|
|
|
}; |
|
|
return stderr; |
|
|
return stderr; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|