- 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.h
class LoginHandler;
class Browser : public WindowListObserver {
 public:
  Browser();
  ~Browser();
  static Browser* Get();
  
  void Quit();
  
  void Exit(int code);
  
  void Shutdown();
  
  void Focus();
  
  std::string GetVersion() const;
  
  void SetVersion(const std::string& version);
  
  std::string GetName() const;
  
  void SetName(const std::string& name);
  
  void AddRecentDocument(const base::FilePath& path);
  
  void ClearRecentDocuments();
  
  void SetAppUserModelID(const base::string16& name);
  
  bool RemoveAsDefaultProtocolClient(const std::string& protocol,