1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-31 16:21:26 +03:00

tree-wide: properly name all threads we fork off

This commit is contained in:
Lennart Poettering 2017-12-22 13:31:55 +01:00
parent 451cdf7830
commit fa7ff4cf03
3 changed files with 5 additions and 1 deletions

View File

@ -81,6 +81,8 @@ int asynchronous_sync(pid_t *ret_pid) {
}
static void *close_thread(void *p) {
(void) pthread_setname_np(pthread_self(), "close");
assert_se(close_nointr(PTR_TO_FD(p)) != -EBADF);
return NULL;
}

View File

@ -147,6 +147,8 @@ static void journal_file_set_offline_internal(JournalFile *f) {
static void * journal_file_set_offline_thread(void *arg) {
JournalFile *f = arg;
(void) pthread_setname_np(pthread_self(), "journal-offline");
journal_file_set_offline_internal(f);
return NULL;

View File

@ -405,7 +405,7 @@ static void* thread_worker(void *p) {
assert_se(pthread_sigmask(SIG_BLOCK, &fullset, NULL) == 0);
/* Assign a pretty name to this thread */
(void) prctl(PR_SET_NAME, (unsigned long) "sd-resolve");
(void) pthread_setname_np(pthread_self(), "sd-resolve");
while (!resolve->dead) {
union {