raw-clone: beef up raw_clone() wrapper a bit
First of all, let's return pid_t, which appears to be the correct type given that we return PIDs, and it#s what fork() uses too. Most importantly though, flush out our PID cache, so that the call becomes compatible with our getpid_cached() logic.
This commit is contained in:
@@ -1083,7 +1083,7 @@ int ioprio_parse_priority(const char *s, int *ret) {
|
||||
|
||||
static pid_t cached_pid = CACHED_PID_UNSET;
|
||||
|
||||
static void reset_cached_pid(void) {
|
||||
void reset_cached_pid(void) {
|
||||
/* Invoked in the child after a fork(), i.e. at the first moment the PID changed */
|
||||
cached_pid = CACHED_PID_UNSET;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user