Add tcsetpgrp()+tcgetpgrp().

One more step on the path to being able to ^C a runaway process. :^)
This commit is contained in:
Andreas Kling 2018-11-02 13:14:25 +01:00
commit 621217ffeb
Notes: sideshowbarker 2024-07-19 18:34:27 +09:00
11 changed files with 72 additions and 4 deletions

View file

@ -25,9 +25,14 @@ pid_t setsid()
return Syscall::invoke(Syscall::PosixSetsid);
}
pid_t sys$getsid(pid_t pid)
pid_t tcgetpgrp(int fd)
{
return Syscall::invoke(Syscall::PosixSetsid, (dword)pid);
return Syscall::invoke(Syscall::PosixTcgetpgrp, (dword)fd);
}
int tcsetpgrp(int fd, pid_t pgid)
{
return Syscall::invoke(Syscall::PosixTcsetpgrp, (dword)fd, (dword)pgid);
}
int setpgid(pid_t pid, pid_t pgid)