mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-18 05:34:02 -04:00
threads: set thread titles
This commit is contained in:
parent
4801e39eae
commit
bd734d5bed
2 changed files with 15 additions and 0 deletions
7
main.c
7
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");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue