A13: Fix posix_spawn wrapper to preserve child PID
- Kernel copies child PID to *pid via copy_to_user
- Wrapper was overwriting *pid with return value (0 on success)
- Removed the line that overwrote *pid, kernel already filled it in
Tests: 119/119 PASS (smoke test, SMP=4)
char* const argv[], char* const envp[]) {
(void)file_actions;
(void)attrp;
+ /* A13: Kernel copies child PID to *pid via copy_to_user, return value is 0 on success */
int ret = _syscall4(SYS_POSIX_SPAWN, (int)pid, (int)path, (int)argv, (int)envp);
if (ret < 0) {
errno = -ret;
return -ret;
}
- if (pid) *pid = ret;
+ /* Don't overwrite *pid - kernel already filled it in */
return 0;
}