OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_COMMON_SET_PROCESS_TITLE_H_ | 5 #ifndef CONTENT_COMMON_SET_PROCESS_TITLE_H_ |
6 #define CHROME_COMMON_SET_PROCESS_TITLE_H_ | 6 #define CONTENT_COMMON_SET_PROCESS_TITLE_H_ |
7 | 7 |
8 // Sets OS-specific process title information based on the command line. This | 8 // Sets OS-specific process title information based on the command line. This |
9 // does nothing if the OS doesn't support or need this capability. | 9 // does nothing if the OS doesn't support or need this capability. |
10 // | 10 // |
11 // Pass in the argv from main(). On Windows, where there is no argv, you can | 11 // Pass in the argv from main(). On Windows, where there is no argv, you can |
12 // pass NULL or just don't call this function, since it does nothing. This | 12 // pass NULL or just don't call this function, since it does nothing. This |
13 // argv pointer will be cached so if you call this function again, you can pass | 13 // argv pointer will be cached so if you call this function again, you can pass |
14 // NULL in the second call. This is to support the case where it's called once | 14 // NULL in the second call. This is to support the case where it's called once |
15 // at startup, and later when a zygote is fork()ed. The later call doesn't have | 15 // at startup, and later when a zygote is fork()ed. The later call doesn't have |
16 // easy access to main's argv. | 16 // easy access to main's argv. |
17 // | 17 // |
18 // On non-Mac Unix platforms, we exec ourselves from /proc/self/exe, but that | 18 // On non-Mac Unix platforms, we exec ourselves from /proc/self/exe, but that |
19 // makes the process name that shows up in "ps" etc. for the child processes | 19 // makes the process name that shows up in "ps" etc. for the child processes |
20 // show as "exe" instead of "chrome" or something reasonable. This function | 20 // show as "exe" instead of "chrome" or something reasonable. This function |
21 // will try to fix it so the "effective" command line shows up instead. | 21 // will try to fix it so the "effective" command line shows up instead. |
22 void SetProcessTitleFromCommandLine(char** main_argv); | 22 void SetProcessTitleFromCommandLine(char** main_argv); |
23 | 23 |
24 #endif // CHROME_COMMON_SET_PROCESS_TITLE_H_ | 24 #endif // CONTENT_COMMON_SET_PROCESS_TITLE_H_ |
25 | |
OLD | NEW |