diff options
author | Jakob Odersky <jakob@odersky.com> | 2018-10-27 18:45:06 -0700 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2018-10-27 18:45:06 -0700 |
commit | de095d377859887352c7380e52ea89bcabf662a0 (patch) | |
tree | 6cee6eb17c1977b85e01078e926499b33854047d /launcher | |
download | byspel-de095d377859887352c7380e52ea89bcabf662a0.tar.gz byspel-de095d377859887352c7380e52ea89bcabf662a0.tar.bz2 byspel-de095d377859887352c7380e52ea89bcabf662a0.zip |
Initial commit
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/procname.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/launcher/procname.c b/launcher/procname.c new file mode 100644 index 0000000..01800d4 --- /dev/null +++ b/launcher/procname.c @@ -0,0 +1,10 @@ +#include <sys/prctl.h> +#include <stdlib.h> + +static void __attribute__ ((constructor)) procname_init() +{ + const char *name; + if ((name = getenv("PROCNAME")) && (*name)) { + prctl(PR_SET_NAME, name); + } +} |