/* 108 */ SyscallDesc("getegid", getegidFunc),
/* 109 */ SyscallDesc("setpgid", setpgidFunc),
/* 110 */ SyscallDesc("getppid", getppidFunc),
- /* 111 */ SyscallDesc("getpgrp", unimplementedFunc),
+ /* 111 */ SyscallDesc("getpgrp", getpgrpFunc),
/* 112 */ SyscallDesc("setsid", unimplementedFunc),
/* 113 */ SyscallDesc("setreuid", unimplementedFunc),
/* 114 */ SyscallDesc("setregid", unimplementedFunc),
return pipeImpl(desc, callnum, tc, false, true);
}
+SyscallReturn
+getpgrpFunc(SyscallDesc *desc, int callnum, ThreadContext *tc)
+{
+ auto process = tc->getProcessPtr();
+ return process->pgid();
+}
+
SyscallReturn
setpgidFunc(SyscallDesc *desc, int callnum, ThreadContext *tc)
{
/// Target chown() handler.
SyscallReturn chownFunc(SyscallDesc *desc, int num, ThreadContext *tc);
+/// Target getpgrpFunc() handler.
+SyscallReturn getpgrpFunc(SyscallDesc *desc, int num, ThreadContext *tc);
+
/// Target setpgid() handler.
SyscallReturn setpgidFunc(SyscallDesc *desc, int num, ThreadContext *tc);