diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-08-01 18:09:16 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-08-01 18:09:16 +0000 |
| commit | bd734d5bedc74531db26626944814952abdc3909 (patch) | |
| tree | 20c8b50af1c8911e4e43791b769ca958447075ea /render.c | |
| parent | conf: make number of scrollback lines configurable (diff) | |
threads: set thread titles
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,9 +1,11 @@ #include "render.h" #include <string.h> + #include <sys/ioctl.h> #include <sys/time.h> #include <sys/timerfd.h> +#include <sys/prctl.h> #include <wayland-cursor.h> #include <xdg-shell.h> @@ -316,6 +318,12 @@ render_worker_thread(void *_ctx) struct terminal *term = ctx->term; const int my_id = ctx->my_id; + char proc_title[16]; + snprintf(proc_title, sizeof(proc_title), "foot:render:%d", my_id); + + if (prctl(PR_SET_NAME, proc_title, 0, 0, 0) < 0) + LOG_ERRNO("render worker %d: failed to set process title", my_id); + sem_t *start = &term->render.workers.start; sem_t *done = &term->render.workers.done; mtx_t *lock = &term->render.workers.lock; |
