summaryrefslogtreecommitdiffstats
path: root/base/setproctitle_linux.h
blob: 32cc2977afda1c03e1498c7fa0ab5c2c019da275 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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_