- 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
return badge_count_;
}
bool Browser::OpenFile(const std::string& file_path) {
  bool prevent_default = false;
  FOR_EACH_OBSERVER(BrowserObserver,
                    observers_,
                    OnOpenFile(&prevent_default, file_path));
  return prevent_default;
}
void Browser::OpenURL(const std::string& url) {
  FOR_EACH_OBSERVER(BrowserObserver, observers_, OnOpenURL(url));
}
void Browser::Activate(bool has_visible_windows) {
  FOR_EACH_OBSERVER(BrowserObserver,
                    observers_,
                    OnActivate(has_visible_windows));
}
void Browser::WillFinishLaunching() {
  FOR_EACH_OBSERVER(BrowserObserver, observers_, OnWillFinishLaunching());
}
void Browser::DidFinishLaunching() {
  
  base::FilePath user_data;
  if (PathService::Get(brightray::DIR_USER_DATA, &user_data))
    base::CreateDirectoryAndGetError(user_data, nullptr);
  is_ready_ = true;
  FOR_EACH_OBSERVER(BrowserObserver, observers_, OnFinishLaunching());
}
void Browser::OnAccessibilitySupportChanged() {