summaryrefslogtreecommitdiffstats
path: root/src/process-name.h
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-08-29 11:22:49 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-08-29 11:22:49 +0200
commit9bc48026a93e8330a2bd2795e78d5951c16b7d33 (patch)
treee4a182f2ed5c43ebc2007f18fd813e21323e7184 /src/process-name.h
parent33c28e126df60d8f7c416e762314d9da79f53448 (diff)
Add option --name for naming the process
This option allows to set the command line and the thread name of the main process. The value can contain spaces that will be replaced by nulls. Change-Id: I895270a24663467b16fb3cd8fc3218b7b003b6bb Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/process-name.h')
-rw-r--r--src/process-name.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/process-name.h b/src/process-name.h
new file mode 100644
index 00000000..874753f6
--- /dev/null
+++ b/src/process-name.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2015, 2016, 2017 "IoT.bzh"
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+extern int process_name_set_name(const char *name);
+extern int process_name_replace_cmdline(char **argv, const char *name);
+