missing_syscall: drop raw_getpid()

This used to be relevant since in old versions of glibc an internal
cache is maintained, while we might sidestep their invalidation
with raw_clone(). After glibc 2.25 getpid() is a trivial wrapper
for the syscall, and hence there's no need to have a separate
raw_getpid().
This commit is contained in:
Mike Yuan
2025-03-04 23:03:24 +01:00
parent c133fcd5c0
commit 33db9f214b
5 changed files with 10 additions and 20 deletions
+2 -2
View File
@@ -1441,7 +1441,7 @@ pid_t getpid_cached(void) {
case CACHED_PID_UNSET: { /* Not initialized yet, then do so now */
pid_t new_pid;
new_pid = raw_getpid();
new_pid = getpid();
if (!installed) {
/* __register_atfork() either returns 0 or -ENOMEM, in its glibc implementation. Since it's
@@ -1462,7 +1462,7 @@ pid_t getpid_cached(void) {
}
case CACHED_PID_BUSY: /* Somebody else is currently initializing */
return raw_getpid();
return getpid();
default: /* Properly initialized */
return current_value;