Add handlescope and flush to process.reallyExit()

pull/22966/head
Ryan Dahl 2010-02-07 21:59:56 -08:00
parent ae1fc497bb
commit 6f92d8f3b0
1 changed files with 3 additions and 4 deletions

View File

@ -465,11 +465,10 @@ static Handle<Value> Umask(const Arguments& args){
}
v8::Handle<v8::Value> 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();
}