- Electron version: v1.3.4 and HEAD.

Node's [`process.exit`](https://nodejs.org/api/process.html#process_process_exit_code) takes an **optional** code argument, which defaults to `0`.

Electron's [`app.exit`](http://electron.atom.io/docs/api/app/#appexitexitcode) takes a **required** code argument.

So the current [`process.exit = app.exit`](https://github.com/electron/electron/blob/b5dec9990eb34a711c57a4f639b2c4c8de866d5f/lib/browser/init.js#L101) breaks electron's `process`-api compatibility with node.

Which causes unhappiness.  For example, when asking `argparse` to print help and exit.  This `(new require('argparse').ArgumentParser()).parseArgs(['--help'])` complains `.: error: Error processing argument at index 0, conversion failure from undefined`.

 `process.exit = app.exit` could be changed to something like `process.exit = function AppExitWithOptionalCode (exitCode) { return app.exit(exitCode || 0); }`.  In node v5.4.1 at least, `process.exit(undefined)` behaves the same as `process.exit()`.  Or perhaps a more precise `app.exit.apply(app, arguments.length ? arguments : [0])`.

atom/browser/browser.cc
: is_quiting_(false),
      is_exiting_(false),
      is_ready_(false),
      is_shutdown_(false) {
  WindowList::AddObserver(this);
}
Browser::~Browser() {
  WindowList::RemoveObserver(this);
}
Browser* Browser::Get() {
  return AtomBrowserMainParts::Get()->browser();
}
void Browser::Quit() {
  if (is_quiting_)
    return;
  is_quiting_ = HandleBeforeQuit();
  if (!is_quiting_)
    return;
  atom::WindowList* window_list = atom::WindowList::GetInstance();
  if (window_list->size() == 0)
    NotifyAndShutdown();
  window_list->CloseAllWindows();
}
void Browser::Exit(int code) {