- Electron version: `1.2.7`
- Operating system: macOS

Attempting to relaunch the app like so

``` js
remote.app.relaunch({ args: remote.process.argv.slice(1).concat(['--dev']) });
remote.app.quit();
```

Throws a really strange error from the `default_app`.

<img width="429" alt="screen shot 2016-07-17 at 1 14 08 pm" src="https://cloud.githubusercontent.com/assets/6634592/16898177/5594b28c-4c20-11e6-8aef-a5d3b91fb643.png">

This is strange as the line it claims to fail on is

https://github.com/electron/electron/blob/master/default_app/main.js#L259

Which does `console.error` so I don't see why it ends up calling `fs.writeSync`

This issue does not occur in the normal Electron app but I assume that is because it isn't attempting to read a `package.json`

atom/browser/relauncher_mac.cc
struct kevent event;
  int events = kevent(kq.get(), nullptr, 0, &event, 1, nullptr);
  if (events != 1) {
    if (events < 0) {
      PLOG(ERROR) << "kevent (monitor)";
    } else {
      LOG(ERROR) << "kevent (monitor): unexpected result " << events;
    }
    return;
  }
  if (event.filter != EVFILT_PROC ||
      event.fflags != NOTE_EXIT ||
      event.ident != static_cast<uintptr_t>(parent_pid)) {
    LOG(ERROR) << "kevent (monitor): unexpected event, filter " << event.filter
               << ", fflags " << event.fflags << ", ident " << event.ident;
    return;
  }
}
int LaunchProgram(const StringVector& relauncher_args,
                  const StringVector& argv) {
  base::LaunchOptions options;
  options.new_process_group = true;  
  base::Process process = base::LaunchProcess(argv, options);
  return process.IsValid() ? 0 : 1;
}
}  
}