summaryrefslogtreecommitdiff
path: root/misc/comm.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/comm.c')
-rw-r--r--misc/comm.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/misc/comm.c b/misc/comm.c
new file mode 100644
index 0000000..989325e
--- /dev/null
+++ b/misc/comm.c
@@ -0,0 +1,18 @@
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <string.h>
+#include <sys/prctl.h>
+#include <unistd.h>
+
+int main(void) {
+ char new_name[] = "notcomm";
+
+ if (prctl(PR_SET_NAME, (unsigned long)new_name, 0, 0, 0) != 0) {
+ perror("prctl");
+ return 1;
+ }
+
+ printf("Changed comm to: %s\n", new_name);
+ sleep(1);
+ return 0;
+}