From 63bd237892e989dd41362058ff1ba8548b770535 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 10 Jan 2011 17:15:17 -0800 Subject: [PATCH] typo setuid -> setsid --- lib/child_process.js | 8 ++++---- src/node_child_process.cc | 12 ++++++------ src/node_child_process.h | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/child_process.js b/lib/child_process.js index b594f7a7cf..e20e80ef0c 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -185,7 +185,7 @@ ChildProcess.prototype.kill = function(sig) { ChildProcess.prototype.spawn = function(path, args, options, customFds) { args = args || []; - var cwd, env, setuid; + var cwd, env, setsid; if (!options || options.cwd === undefined && options.env === undefined && options.customFds === undefined) { @@ -193,13 +193,13 @@ ChildProcess.prototype.spawn = function(path, args, options, customFds) { cwd = ''; env = options || process.env; customFds = customFds || [-1, -1, -1]; - setuid = false; + setsid = false; } else { // Recommended API: (path, args, options) cwd = options.cwd || ''; env = options.env || process.env; customFds = options.customFds || [-1, -1, -1]; - setuid = options.setuid ? true : false; + setsid = options.setsid ? true : false; } var envPairs = []; @@ -214,7 +214,7 @@ ChildProcess.prototype.spawn = function(path, args, options, customFds) { cwd, envPairs, customFds, - setuid); + setsid); this.fds = fds; if (customFds[0] === -1 || customFds[0] === undefined) { diff --git a/src/node_child_process.cc b/src/node_child_process.cc index eaada0aa45..adc919f007 100644 --- a/src/node_child_process.cc +++ b/src/node_child_process.cc @@ -150,15 +150,15 @@ Handle ChildProcess::Spawn(const Arguments& args) { } } - int do_setuid = false; + int do_setsid = false; if (args[5]->IsBoolean()) { - do_setuid = args[5]->BooleanValue(); + do_setsid = args[5]->BooleanValue(); } int fds[3]; - int r = child->Spawn(argv[0], argv, cwd, env, fds, custom_fds, do_setuid); + int r = child->Spawn(argv[0], argv, cwd, env, fds, custom_fds, do_setsid); for (i = 0; i < argv_length; i++) free(argv[i]); delete [] argv; @@ -233,7 +233,7 @@ int ChildProcess::Spawn(const char *file, char **env, int stdio_fds[3], int custom_fds[3], - bool do_setuid) { + bool do_setsid) { HandleScope scope; assert(pid_ == -1); assert(!ev_is_active(&child_watcher_)); @@ -274,8 +274,8 @@ int ChildProcess::Spawn(const char *file, return -4; case 0: // Child. - if (do_setuid && setsid() < 0) { - perror("setuid"); + if (do_setsid && setsid() < 0) { + perror("setsid"); } if (custom_fds[0] == -1) { diff --git a/src/node_child_process.h b/src/node_child_process.h index 2062a097a9..f9363195f2 100644 --- a/src/node_child_process.h +++ b/src/node_child_process.h @@ -64,7 +64,7 @@ class ChildProcess : ObjectWrap { char **env, int stdio_fds[3], int custom_fds[3], - bool do_setuid); + bool do_setsid); // Simple syscall wrapper. Does not disable the watcher. onexit will be // called still.