diff --git a/src/node.cc b/src/node.cc index 5726578fdbb..493fad10663 100644 --- a/src/node.cc +++ b/src/node.cc @@ -465,11 +465,10 @@ static Handle Umask(const Arguments& args){ } v8::Handle Exit(const v8::Arguments& args) { - int r = 0; - if (args.Length() > 0) - r = args[0]->IntegerValue(); + HandleScope scope; fflush(stderr); - exit(r); + Stdio::Flush(); + exit(args[0]->IntegerValue()); return Undefined(); }