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:
Lennart Poettering
2018-01-04 13:27:26 +01:00
parent 3139096321
commit 799a960d1f
3 changed files with 24 additions and 21 deletions
+1
View File
@@ -147,6 +147,7 @@ static inline int sched_policy_to_string_alloc_with_check(int n, char **s) {
int ioprio_parse_priority(const char *s, int *ret);
pid_t getpid_cached(void);
void reset_cached_pid(void);
int must_be_root(void);