summaryrefslogtreecommitdiff
path: root/src/node.js
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2013-07-18 23:18:50 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2013-07-20 12:09:29 +0200
commitca9eb718fbf2cd2c60c7aeb3ca33413e17fcbbf0 (patch)
treeb9415d0e2f6005a651276cbc40d23196a8c02ddf /src/node.js
parent0161ec87af3d71b10d8ce679c8a1a64358fae8dc (diff)
downloadnode-ca9eb718fbf2cd2c60c7aeb3ca33413e17fcbbf0.tar.gz
src, lib: update after internal api change
Libuv now returns errors directly. Make everything in src/ and lib/ follow suit. The changes to lib/ are not strictly necessary but they remove the need for the abominations that are process._errno and node::SetErrno().
Diffstat (limited to 'src/node.js')
-rw-r--r--src/node.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/node.js b/src/node.js
index 061cbf9c3..e9bcd0bcd 100644
--- a/src/node.js
+++ b/src/node.js
@@ -626,23 +626,23 @@
};
process.kill = function(pid, sig) {
- var r;
+ var err;
// preserve null signal
if (0 === sig) {
- r = process._kill(pid, 0);
+ err = process._kill(pid, 0);
} else {
sig = sig || 'SIGTERM';
if (startup.lazyConstants()[sig]) {
- r = process._kill(pid, startup.lazyConstants()[sig]);
+ err = process._kill(pid, startup.lazyConstants()[sig]);
} else {
throw new Error('Unknown signal: ' + sig);
}
}
- if (r) {
+ if (err) {
var errnoException = NativeModule.require('util')._errnoException;
- throw errnoException(process._errno, 'kill');
+ throw errnoException(err, 'kill');
}
return true;
@@ -673,11 +673,11 @@
wrap.onsignal = function() { process.emit(type); };
var signum = startup.lazyConstants()[type];
- var r = wrap.start(signum);
- if (r) {
+ var err = wrap.start(signum);
+ if (err) {
wrap.close();
var errnoException = NativeModule.require('util')._errnoException;
- throw errnoException(process._errno, 'uv_signal_start');
+ throw errnoException(err, 'uv_signal_start');
}
signalWraps[type] = wrap;