aboutsummaryrefslogtreecommitdiff
path: root/lib/command-line.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-01-19 15:00:56 -0800
committerBen Pfaff <blp@nicira.com>2010-01-26 10:52:46 -0800
commit40f0707cd9d105203c2b8b97a955b57aca426f13 (patch)
treefe1150b1cdd4ee8dbfabc3ce37ed2bceced12ac9 /lib/command-line.h
parent7c6a5f146742506a7a15cceface63ec3ba1e3076 (diff)
daemon: Make --monitor process change its process title.
When --monitor is used, administrators sometimes become confused about the presence of two copies of each process. This commit attempts to clarify the situation by making the monitoring process change its process name, as seen in /proc/$pid/cmdline and in "ps", to clearly indicate what is going on. CC: Dan Wendlandt <dan@nicira.com>
Diffstat (limited to 'lib/command-line.h')
-rw-r--r--lib/command-line.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/command-line.h b/lib/command-line.h
index bc2071ef..1c880033 100644
--- a/lib/command-line.h
+++ b/lib/command-line.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,4 +33,9 @@ struct command {
char *long_options_to_short_options(const struct option *options);
void run_command(int argc, char *argv[], const struct command[]);
+void proctitle_init(int argc, char **argv);
+void proctitle_set(const char *, ...)
+ PRINTF_FORMAT(1, 2);
+void proctitle_restore(void);
+
#endif /* command-line.h */