|
|
@ -1444,7 +1444,9 @@ static Handle<Value> Cwd(const Arguments& args) { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#ifdef __POSIX__ |
|
|
|
#ifndef __POSIX__ |
|
|
|
# define umask _umask |
|
|
|
#endif |
|
|
|
|
|
|
|
static Handle<Value> Umask(const Arguments& args) { |
|
|
|
HandleScope scope; |
|
|
@ -1484,6 +1486,8 @@ static Handle<Value> Umask(const Arguments& args){ |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#ifdef __POSIX__ |
|
|
|
|
|
|
|
static Handle<Value> GetUid(const Arguments& args) { |
|
|
|
HandleScope scope; |
|
|
|
assert(args.Length() == 0); |
|
|
@ -1491,6 +1495,7 @@ static Handle<Value> GetUid(const Arguments& args) { |
|
|
|
return scope.Close(Integer::New(uid)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static Handle<Value> GetGid(const Arguments& args) { |
|
|
|
HandleScope scope; |
|
|
|
assert(args.Length() == 0); |
|
|
@ -1538,6 +1543,7 @@ static Handle<Value> SetGid(const Arguments& args) { |
|
|
|
return Undefined(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static Handle<Value> SetUid(const Arguments& args) { |
|
|
|
HandleScope scope; |
|
|
|
|
|
|
@ -1577,6 +1583,7 @@ static Handle<Value> SetUid(const Arguments& args) { |
|
|
|
return Undefined(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endif // __POSIX__
|
|
|
|
|
|
|
|
|
|
|
@ -2187,6 +2194,8 @@ Handle<Object> SetupProcessObject(int argc, char *argv[]) { |
|
|
|
NODE_SET_METHOD(process, "chdir", Chdir); |
|
|
|
NODE_SET_METHOD(process, "cwd", Cwd); |
|
|
|
|
|
|
|
NODE_SET_METHOD(process, "umask", Umask); |
|
|
|
|
|
|
|
#ifdef __POSIX__ |
|
|
|
NODE_SET_METHOD(process, "getuid", GetUid); |
|
|
|
NODE_SET_METHOD(process, "setuid", SetUid); |
|
|
@ -2194,7 +2203,6 @@ Handle<Object> SetupProcessObject(int argc, char *argv[]) { |
|
|
|
NODE_SET_METHOD(process, "setgid", SetGid); |
|
|
|
NODE_SET_METHOD(process, "getgid", GetGid); |
|
|
|
|
|
|
|
NODE_SET_METHOD(process, "umask", Umask); |
|
|
|
NODE_SET_METHOD(process, "dlopen", DLOpen); |
|
|
|
NODE_SET_METHOD(process, "_kill", Kill); |
|
|
|
#endif // __POSIX__
|
|
|
|