From bd734d5bedc74531db26626944814952abdc3909 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 1 Aug 2019 20:09:16 +0200 Subject: threads: set thread titles --- main.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index 68e22e31..40e1dc4b 100644 --- a/main.c +++ b/main.c @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -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"); -- cgit v1.3