Kernel/LibC: Implement getppid
This commit is contained in:
parent
fd3246113a
commit
ad1f175a39
|
@ -97,6 +97,7 @@ namespace Kernel
|
|||
BAN::ErrorOr<long> sys_getegid() const { return m_credentials.egid(); }
|
||||
BAN::ErrorOr<long> sys_getpgid(pid_t);
|
||||
|
||||
BAN::ErrorOr<long> sys_getppid() const { return m_parent; }
|
||||
BAN::ErrorOr<long> sys_getpid() const { return pid(); }
|
||||
|
||||
BAN::ErrorOr<long> open_inode(VirtualFileSystem::File&&, int flags);
|
||||
|
|
|
@ -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) \
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue