mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Fix a bug that was suppressing the error in setgid, allowing it to fail silently.
This commit is contained in:
1 parent
769a35024f
commit
0dba38eef0
1 file changed
+1
-1
+1
-1
@@ -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