this.exitCode = null;
this.killed = false;
- this._internal = new Process();
- this._internal.onexit = function(exitCode, signalCode) {
+ this._handle = new Process();
+ this._handle.onexit = function(exitCode, signalCode) {
//
// follow 0.4.x behaviour:
//
self.stdin.destroy();
}
- self._internal.close();
- self._internal = null;
+ self._handle.close();
+ self._handle = null;
self.emit('exit', self.exitCode, self.signalCode);
setStreamOption('stdoutStream', 1, options);
setStreamOption('stderrStream', 2, options);
- var r = this._internal.spawn(options);
+ var r = this._handle.spawn(options);
if (r) {
if (options.stdinStream) {
options.stderrStream.close();
}
- this._internal.close();
- this._internal = null;
+ this._handle.close();
+ this._handle = null;
throw errnoException(errno, 'spawn');
}
- this.pid = this._internal.pid;
+ this.pid = this._handle.pid;
if (options.stdinStream) {
this.stdin = createSocket(options.stdinStream, false);
throw new Error('Unknown signal: ' + sig);
}
- if (this._internal) {
+ if (this._handle) {
this.killed = true;
- var r = this._internal.kill(signal);
+ var r = this._handle.kill(signal);
if (r === -1) {
this.emit('error', errnoException(errno, 'kill'));
return;