feat(userspace/libc): implement getpid, getppid & getuid

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
EnderIce2 2025-02-20 01:49:12 +02:00
parent 5089cfa81b
commit e5acf4a99e
No known key found for this signature in database
GPG Key ID: 2EE20AF089811A5A

View File

@ -208,11 +208,25 @@ export char *getpass(const char *);
export pid_t getpgid(pid_t);
export pid_t getpgrp(void);
export pid_t getpid(void) { return syscall0(SYS_GETPID); }
export pid_t getppid(void) { return syscall0(SYS_GETPPID); }
export pid_t getpid(void)
{
return call_getpid();
}
export pid_t getppid(void)
{
return call_getppid();
}
export pid_t getsid(pid_t);
export uid_t getuid(void);
export uid_t getuid(void)
{
/* FIXME: getuid */
return 0;
// return call_getuid();
}
export char *getwd(char *);
export int isatty(int);
export int lchown(const char *, uid_t, gid_t);