mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
Fix a bug that was suppressing the error in setgid, allowing it to fail silently.
This commit is contained in:
@@ -506,7 +506,7 @@ static Handle<Value> SetGid(const Arguments& args) {
|
||||
Local<Integer> given_gid = args[0]->ToInteger();
|
||||
int gid = given_gid->Int32Value();
|
||||
int result;
|
||||
if ((result == setgid(gid)) != 0) {
|
||||
if ((result = setgid(gid)) != 0) {
|
||||
return ThrowException(Exception::Error(String::New(strerror(errno))));
|
||||
}
|
||||
return Undefined();
|
||||
|
||||
Reference in New Issue
Block a user