1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:27:45 +00:00

Implement signal() via sigaction() and get rid of sys$signal().

This commit is contained in:
Andreas Kling 2018-11-28 22:27:32 +01:00
parent d90104f9e0
commit 464a16afa2
5 changed files with 9 additions and 19 deletions

View file

@ -1660,15 +1660,6 @@ int Process::sys$dup2(int old_fd, int new_fd)
return new_fd;
}
Unix::sighandler_t Process::sys$signal(int signum, Unix::sighandler_t handler)
{
// FIXME: Fail with -EINVAL if attepmting to catch or ignore SIGKILL or SIGSTOP.
if (signum < 1 || signum >= 32)
return (Unix::sighandler_t)-EINVAL;
dbgprintf("sys$signal: %d => L%x\n", signum, handler);
return nullptr;
}
int Process::sys$sigprocmask(int how, const Unix::sigset_t* set, Unix::sigset_t* old_set)
{
if (old_set) {

View file

@ -154,7 +154,6 @@ public:
int sys$ttyname_r(int fd, char*, size_t);
pid_t sys$fork(RegisterDump&);
int sys$execve(const char* filename, const char** argv, const char** envp);
Unix::sighandler_t sys$signal(int signum, Unix::sighandler_t);
int sys$isatty(int fd);
int sys$getdtablesize();
int sys$dup(int oldfd);

View file

@ -133,8 +133,6 @@ static dword handle(RegisterDump& regs, dword function, dword arg1, dword arg2,
return current->sys$geteuid();
case Syscall::SC_getegid:
return current->sys$getegid();
case Syscall::SC_signal:
return (dword)current->sys$signal((int)arg1, (Unix::sighandler_t)arg2);
case Syscall::SC_isatty:
return current->sys$isatty((int)arg1);
case Syscall::SC_getdtablesize:

View file

@ -41,7 +41,6 @@
__ENUMERATE_SYSCALL(execve) \
__ENUMERATE_SYSCALL(geteuid) \
__ENUMERATE_SYSCALL(getegid) \
__ENUMERATE_SYSCALL(signal) \
__ENUMERATE_SYSCALL(isatty) \
__ENUMERATE_SYSCALL(getdtablesize) \
__ENUMERATE_SYSCALL(dup) \