mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-07 14:50:22 +00:00
red-worker: Set thread name if possible
Name will be visible in debugger and /proc filesystem Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
c8bc09bcb3
commit
f712f2637d
@ -19,6 +19,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
@ -1397,6 +1398,7 @@ bool red_worker_run(RedWorker *worker)
|
||||
spice_error("create thread failed %d", r);
|
||||
}
|
||||
pthread_sigmask(SIG_SETMASK, &curr_sig_mask, NULL);
|
||||
pthread_setname_np(worker->thread, "SPICE Worker");
|
||||
|
||||
return r == 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user