forked from mirrors/gecko-dev
The major changes: * Instead of importing `base::ReadFileToString`, which is used only to determine if a `/proc` pseudo-file contains more than a certain number of characters, we simply `read` enough to determine that information. * Instead of importing `base::NoDestructor` and wrapping it around STL containers, we simply `strdup` the strings we need to copy out of the initial arg/env area. (In theory this could set off LSan if the copied string later becomes unreachable, but in practice that doesn't seem to happen, and it's easily fixable if that changes.) * Chromium copies only the environment strings and allows the argv strings to be overwritten; this may be safe for how they access the command line arguments but it may not be for us, so this patch changes it to copy all of the strings. Differential Revision: https://phabricator.services.mozilla.com/D187634
12 lines
482 B
C
12 lines
482 B
C
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef BASE_PROCESS_TITLE_LINUX_H_
|
|
#define BASE_PROCESS_TITLE_LINUX_H_
|
|
|
|
void setproctitle(const char* fmt, ...);
|
|
void setproctitle_init(char** main_argv);
|
|
|
|
#endif // BASE_PROCESS_TITLE_LINUX_H_
|