Kernel/LibC: Implement getppid

This commit is contained in:
2024-12-02 05:55:25 +02:00
parent fd3246113a
commit ad1f175a39
3 changed files with 7 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ __BEGIN_DECLS
O(SYS_KILL, kill) \
O(SYS_TCGETPGRP, tcgetpgrp) \
O(SYS_TCSETPGRP, tcsetpgrp) \
O(SYS_GET_PPID, getppid) \
O(SYS_GET_PID, getpid) \
O(SYS_GET_PGID, getpgid) \
O(SYS_SET_PGID, setpgid) \

View File

@@ -489,6 +489,11 @@ error:
return ret;
}
pid_t getppid(void)
{
return syscall(SYS_GET_PPID);
}
pid_t getpid(void)
{
return syscall(SYS_GET_PID);