Browse Source

Fix a bug that was suppressing the error in setgid, allowing it to fail silently.

v0.7.4-release
isaacs 15 years ago
committed by Ryan Dahl
parent
commit
0dba38eef0
  1. 2
      src/node.cc

2
src/node.cc

@ -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();

Loading…
Cancel
Save