diff options
| author | daniel <daniel@planethacker.net> | 2025-05-06 16:57:32 -0700 |
|---|---|---|
| committer | daniel <daniel@planethacker.net> | 2025-05-06 16:57:32 -0700 |
| commit | 2278df1493e064c197913e49b5d1935942d83448 (patch) | |
| tree | 42f06ab2f76e2ddf228bafbb03f79621975a4534 /misc/comm.c | |
initial import
Diffstat (limited to 'misc/comm.c')
| -rw-r--r-- | misc/comm.c | 18 |
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; +} |
