pidref: hookup PID_AUTOMATIC special pid_t value with PidRef

The PID_AUTOMATIC value is now properly recognized by the PidRef logic
too. This needed some massaging of header includes, to ensure pidref.h
can access process-util.h's definitions and vice versa.
This commit is contained in:
Lennart Poettering
2024-10-14 12:44:36 +02:00
parent 8d24b2f017
commit de34ec188c
6 changed files with 52 additions and 6 deletions
+4
View File
@@ -428,6 +428,10 @@ int pidref_wait_for_terminate(const PidRef *pidref, siginfo_t *ret) {
}
}
bool pidref_is_automatic(const PidRef *pidref) {
return pidref && pid_is_automatic(pidref->pid);
}
static void pidref_hash_func(const PidRef *pidref, struct siphash *state) {
siphash24_compress_typesafe(pidref->pid, state);
}