diff --git a/atom/browser/browser_linux.cc b/atom/browser/browser_linux.cc index 280d2defb6b9..42cdcc043d75 100644 --- a/atom/browser/browser_linux.cc +++ b/atom/browser/browser_linux.cc @@ -31,10 +31,7 @@ bool LaunchXdgUtility(const std::vector& argv, int* exit_code) { if (devnull < 0) return false; base::LaunchOptions options; - - base::FileHandleMappingVector remap; - remap.push_back(std::make_pair(devnull, STDIN_FILENO)); - options.fds_to_remap = &remap; + options.fds_to_remap.push_back(std::make_pair(devnull, STDIN_FILENO)); base::Process process = base::LaunchProcess(argv, options); close(devnull); diff --git a/atom/browser/relauncher_linux.cc b/atom/browser/relauncher_linux.cc index 6d60b072f6d9..b5e84bce12d6 100644 --- a/atom/browser/relauncher_linux.cc +++ b/atom/browser/relauncher_linux.cc @@ -60,14 +60,13 @@ int LaunchProgram(const StringVector& relauncher_args, // Redirect the stdout of child process to /dev/null, otherwise after // relaunch the child process will raise exception when writing to stdout. base::ScopedFD devnull(HANDLE_EINTR(open("/dev/null", O_WRONLY))); - base::FileHandleMappingVector no_stdout; - no_stdout.push_back(std::make_pair(devnull.get(), STDERR_FILENO)); - no_stdout.push_back(std::make_pair(devnull.get(), STDOUT_FILENO)); base::LaunchOptions options; options.allow_new_privs = true; options.new_process_group = true; // detach - options.fds_to_remap = &no_stdout; + options.fds_to_remap.push_back(std::make_pair(devnull.get(), STDERR_FILENO)); + options.fds_to_remap.push_back(std::make_pair(devnull.get(), STDOUT_FILENO)); + base::Process process = base::LaunchProcess(argv, options); return process.IsValid() ? 0 : 1; }