diff options
-rw-r--r-- | src/arch/x86/linux/process.cc | 2 | ||||
-rw-r--r-- | src/sim/syscall_emul.cc | 7 | ||||
-rw-r--r-- | src/sim/syscall_emul.hh | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/arch/x86/linux/process.cc b/src/arch/x86/linux/process.cc index 9ffde7f90..8f669bfa5 100644 --- a/src/arch/x86/linux/process.cc +++ b/src/arch/x86/linux/process.cc @@ -373,7 +373,7 @@ static SyscallDesc syscallDescs64[] = { /* 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), diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc index 28e3e3ded..088dcbcce 100644 --- a/src/sim/syscall_emul.cc +++ b/src/sim/syscall_emul.cc @@ -983,6 +983,13 @@ pipe2Func(SyscallDesc *desc, int callnum, ThreadContext *tc) } SyscallReturn +getpgrpFunc(SyscallDesc *desc, int callnum, ThreadContext *tc) +{ + auto process = tc->getProcessPtr(); + return process->pgid(); +} + +SyscallReturn setpgidFunc(SyscallDesc *desc, int callnum, ThreadContext *tc) { int index = 0; diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index 875f565cd..130791d20 100644 --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -226,6 +226,9 @@ SyscallReturn gettidFunc(SyscallDesc *desc, int num, 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); |