pidref: add pidref_set_parent() for race-freely getting pidref on ppid
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ int pidref_set_pidstr(PidRef *pidref, const char *pid);
|
||||
int pidref_set_pidfd(PidRef *pidref, int fd);
|
||||
int pidref_set_pidfd_take(PidRef *pidref, int fd); /* takes ownership of the passed pidfd on success*/
|
||||
int pidref_set_pidfd_consume(PidRef *pidref, int fd); /* takes ownership of the passed pidfd in both success and failure */
|
||||
|
||||
int pidref_set_parent(PidRef *ret);
|
||||
static inline int pidref_set_self(PidRef *pidref) {
|
||||
return pidref_set_pid(pidref, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user