- Electron version: 1.1.0
- Operating system: Windows
- Use case: cleanup and reporting tasks executed on quit (headless), which may take time and should not prevent from opening a new instance.
- Proposed solutions:
  - new _app.releaseSingleInstance()_ API which free the singleInstance lock
  - replace _app.releaseSingleInstance()_ API by an event listener (which may be listened/unlistened)
  - [app.makeSingleInstance](https://github.com/electron/electron/blob/master/docs/api/app.md#appmakesingleinstancecallback) returns the result of the callback function. So we can choose to quit or not in a more accurate way.
  - Provide a communication channel between the new instance and the main one (in callback arguments)

atom/browser/api/atom_api_app.cc
#if defined(OS_LINUX)
  std::unique_ptr<base::Environment> env(base::Environment::Create());
  env->SetVar("CHROME_DESKTOP", desktop_name);
#endif
}
std::string App::GetLocale() {
  return l10n_util::GetApplicationLocale("");
}
bool App::MakeSingleInstance(
    const ProcessSingleton::NotificationCallback& callback) {
  if (process_singleton_.get())
    return false;
  base::FilePath user_dir;
  PathService::Get(brightray::DIR_USER_DATA, &user_dir);
  process_singleton_.reset(new ProcessSingleton(
      user_dir, base::Bind(NotificationCallbackWrapper, callback)));
  switch (process_singleton_->NotifyOtherProcessOrCreate()) {
    case ProcessSingleton::NotifyResult::LOCK_ERROR:
    case ProcessSingleton::NotifyResult::PROFILE_IN_USE:
    case ProcessSingleton::NotifyResult::PROCESS_NOTIFIED:
      process_singleton_.reset();
      return true;
    case ProcessSingleton::NotifyResult::PROCESS_NONE:
    default:  
      return false;
  }
}
#if defined(USE_NSS_CERTS)
void App::ImportCertificate(