mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:37:46 +00:00
Implement signal() via sigaction() and get rid of sys$signal().
This commit is contained in:
parent
d90104f9e0
commit
464a16afa2
5 changed files with 9 additions and 19 deletions
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue