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:
parent
451cdf7830
commit
fa7ff4cf03
@ -81,6 +81,8 @@ int asynchronous_sync(pid_t *ret_pid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void *close_thread(void *p) {
|
static void *close_thread(void *p) {
|
||||||
|
(void) pthread_setname_np(pthread_self(), "close");
|
||||||
|
|
||||||
assert_se(close_nointr(PTR_TO_FD(p)) != -EBADF);
|
assert_se(close_nointr(PTR_TO_FD(p)) != -EBADF);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -147,6 +147,8 @@ static void journal_file_set_offline_internal(JournalFile *f) {
|
|||||||
static void * journal_file_set_offline_thread(void *arg) {
|
static void * journal_file_set_offline_thread(void *arg) {
|
||||||
JournalFile *f = arg;
|
JournalFile *f = arg;
|
||||||
|
|
||||||
|
(void) pthread_setname_np(pthread_self(), "journal-offline");
|
||||||
|
|
||||||
journal_file_set_offline_internal(f);
|
journal_file_set_offline_internal(f);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -405,7 +405,7 @@ static void* thread_worker(void *p) {
|
|||||||
assert_se(pthread_sigmask(SIG_BLOCK, &fullset, NULL) == 0);
|
assert_se(pthread_sigmask(SIG_BLOCK, &fullset, NULL) == 0);
|
||||||
|
|
||||||
/* Assign a pretty name to this thread */
|
/* 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) {
|
while (!resolve->dead) {
|
||||||
union {
|
union {
|
||||||
|
Loading…
Reference in New Issue
Block a user