Avi Drissman | 4e1b7bc3 | 2022-09-15 14:03:50 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors |
[email protected] | 7f113f3 | 2009-09-10 18:02:17 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
Shintaro Kawamura | 20d4a7d | 2024-03-08 05:16:24 | [diff] [blame] | 5 | #ifndef BASE_PROCESS_SET_PROCESS_TITLE_LINUX_H_ |
6 | #define BASE_PROCESS_SET_PROCESS_TITLE_LINUX_H_ | ||||
7 | |||||
8 | #include "base/base_export.h" | ||||
[email protected] | 7f113f3 | 2009-09-10 18:02:17 | [diff] [blame] | 9 | |
[email protected] | 7f113f3 | 2009-09-10 18:02:17 | [diff] [blame] | 10 | // Set the process title that will show in "ps" and similar tools. Takes |
11 | // printf-style format string and arguments. After calling setproctitle() | ||||
[email protected] | f07bd1e | 2010-01-03 02:20:08 | [diff] [blame] | 12 | // the original main() argv[] array should not be used. By default, the |
13 | // original argv[0] is prepended to the format; this can be disabled by | ||||
14 | // including a '-' as the first character of the format string. | ||||
[email protected] | 74e9fa2 | 2010-12-29 21:06:43 | [diff] [blame] | 15 | // |
16 | // This signature and naming is to be compatible with most other Unix | ||||
17 | // implementations of setproctitle(). | ||||
Shintaro Kawamura | 20d4a7d | 2024-03-08 05:16:24 | [diff] [blame] | 18 | BASE_EXPORT void setproctitle(const char* fmt, ...); |
[email protected] | 7f113f3 | 2009-09-10 18:02:17 | [diff] [blame] | 19 | |
20 | // Initialize state needed for setproctitle() on Linux. Pass the argv pointer | ||||
21 | // from main() to setproctitle_init() before calling setproctitle(). | ||||
Shintaro Kawamura | 20d4a7d | 2024-03-08 05:16:24 | [diff] [blame] | 22 | BASE_EXPORT void setproctitle_init(const char** main_argv); |
[email protected] | 7f113f3 | 2009-09-10 18:02:17 | [diff] [blame] | 23 | |
Shintaro Kawamura | 20d4a7d | 2024-03-08 05:16:24 | [diff] [blame] | 24 | #endif // BASE_PROCESS_SET_PROCESS_TITLE_LINUX_H_ |