diff options
author | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-10 18:02:17 +0000 |
---|---|---|
committer | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-10 18:02:17 +0000 |
commit | 7f113f39afed41b39d5c937039879c5d822c6b5e (patch) | |
tree | db014b39bf9cdc6daf6aae947a16c4c5ff5d1721 /base/setproctitle_linux.h | |
parent | e4e3caed74ecfe1ef1da4c7ba8fc076f59a53ef1 (diff) | |
download | chromium_src-7f113f39afed41b39d5c937039879c5d822c6b5e.zip chromium_src-7f113f39afed41b39d5c937039879c5d822c6b5e.tar.gz chromium_src-7f113f39afed41b39d5c937039879c5d822c6b5e.tar.bz2 |
Linux: set the process title (that shows in "ps" etc.) of renderers correctly when using the zygote.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/196009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25877 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/setproctitle_linux.h')
-rw-r--r-- | base/setproctitle_linux.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/base/setproctitle_linux.h b/base/setproctitle_linux.h new file mode 100644 index 0000000..32cc297 --- /dev/null +++ b/base/setproctitle_linux.h @@ -0,0 +1,25 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef BASE_SETPROCTITLE_LINUX_H_ +#define BASE_SETPROCTITLE_LINUX_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +// Set the process title that will show in "ps" and similar tools. Takes +// printf-style format string and arguments. After calling setproctitle() +// the original main() argv[] array should not be used. +void setproctitle(const char* fmt, ...); + +// Initialize state needed for setproctitle() on Linux. Pass the argv pointer +// from main() to setproctitle_init() before calling setproctitle(). +void setproctitle_init(char** main_argv); + +#ifdef __cplusplus +} +#endif + +#endif // BASE_SETPROCTITLE_LINUX_H_ |