mescc: Support Bash: Add getppid.

* lib/linux/gnu.c (getppid): New function.
* include/linux/x86/syscall.h (SYS_getppid): New macro.
* include/linux/x86_64/syscall.h (SYS_getppid): New macro.
This commit is contained in:
Jan Nieuwenhuizen 2018-12-14 18:48:03 +01:00
parent 7f6ca031f9
commit 47d9996079
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
3 changed files with 8 additions and 0 deletions

View file

@ -78,6 +78,7 @@
#define SYS_geteuid 0x31 #define SYS_geteuid 0x31
#define SYS_getegid 0x32 #define SYS_getegid 0x32
#define SYS_setgid 0x3e #define SYS_setgid 0x3e
#define SYS_getppid 0x40
// make+POSIX // make+POSIX
#define SYS_sigprocmask 0x7e #define SYS_sigprocmask 0x7e

View file

@ -75,6 +75,7 @@
#define SYS_setgid 0x6a #define SYS_setgid 0x6a
#define SYS_geteuid 0x6b #define SYS_geteuid 0x6b
#define SYS_getegid 0x6c #define SYS_getegid 0x6c
#define SYS_getppid 0x6e
// make+POSIX // make+POSIX
#define SYS_rt_sigprocmask 0x0e #define SYS_rt_sigprocmask 0x0e

View file

@ -169,6 +169,12 @@ getegid ()
return _sys_call (SYS_getegid); return _sys_call (SYS_getegid);
} }
pid_t
getppid ()
{
return _sys_call (SYS_getppid);
}
int int
setuid (uid_t newuid) setuid (uid_t newuid)
{ {