- 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
std::string GetCurrentActivityType();
  
  bool ContinueUserActivity(const std::string& type,
                            const base::DictionaryValue& user_info);
  
  enum BounceType {
    BOUNCE_CRITICAL = 0,
    BOUNCE_INFORMATIONAL = 10,
  };
  int DockBounce(BounceType type);
  void DockCancelBounce(int request_id);
  
  void DockDownloadFinished(const std::string& filePath);
  
  void DockSetBadgeText(const std::string& label);
  std::string DockGetBadgeText();
  
  void DockHide();
  void DockShow();
  bool DockIsVisible();
  
  void DockSetMenu(AtomMenuModel* model);
  
  void DockSetIcon(const gfx::Image& image);
#endif  
#if defined(OS_WIN)
  struct UserTask {
    base::FilePath program;
    base::string16 arguments;
    base::string16 title;