commit d3a539a72a2c476bfe80ce928f8d44528e1f1815 parent 3961e6290fd11da2e06dd3940658077bd2a451b4 Author: Lennart Jablonka <humm@ljabl.com> Date: Tue, 30 Jan 2024 19:56:12 +0000 rt/+openbsd: add getpgid Signed-off-by: Lennart Jablonka <humm@ljabl.com> Diffstat:
M | rt/+openbsd/syscalls.ha | | | 12 | ++++++++++++ |
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/rt/+openbsd/syscalls.ha b/rt/+openbsd/syscalls.ha @@ -1130,6 +1130,18 @@ export fn sysctl( // mlock // munlock // getpgid + +@symbol("getpgid") fn libc_getpgid(pid: pid_t) pid_t; + +export fn getpgid(pid: pid_t) (pid_t | errno) = { + let res = libc_getpgid(pid); + if (res == -1) { + return *__errno(): errno; + }; + + return res; +}; + // utrace // semget // msgget