aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-08-01 18:09:16 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-08-01 18:09:16 +0000
commitbd734d5bedc74531db26626944814952abdc3909 (patch)
tree20c8b50af1c8911e4e43791b769ca958447075ea /main.c
parentconf: make number of scrollback lines configurable (diff)
threads: set thread titles
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/main.c b/main.c
index 68e22e31..40e1dc4b 100644
--- a/main.c
+++ b/main.c
@@ -12,6 +12,7 @@
#include <sys/timerfd.h>
#include <sys/sysinfo.h>
+#include <sys/prctl.h>
#include <freetype/tttables.h>
#include <wayland-client.h>
@@ -196,6 +197,12 @@ keyboard_repeater(void *arg)
{
struct terminal *term = arg;
+ char proc_title[16];
+ snprintf(proc_title, sizeof(proc_title), "foot:kbd-repeat");
+
+ if (prctl(PR_SET_NAME, proc_title, 0, 0, 0) < 0)
+ LOG_ERRNO("kbd repeat: failed to set process title");
+
while (true) {
LOG_DBG("repeater: waiting for start");