From 6f92d8f3b078e93a65686655b05141ab456a9293 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sun, 7 Feb 2010 21:59:56 -0800 Subject: [PATCH] Add handlescope and flush to process.reallyExit() --- src/node.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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(); }