mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
Some improvements to signals.
- Add sigprocmask() and sigpending(). - Forked children inherit signal dispositions and masks. - Exec clears signal dispositions and masks.
This commit is contained in:
parent
c97a5862ce
commit
6a0a2c9ab4
7 changed files with 60 additions and 4 deletions
|
@ -71,6 +71,18 @@ int sigismember(const sigset_t* set, int sig)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int sigprocmask(int how, const sigset_t* set, sigset_t* old_set)
|
||||
{
|
||||
int rc = Syscall::invoke(Syscall::SC_sigprocmask, (dword)how, (dword)set, (dword)old_set);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int sigpending(sigset_t* set)
|
||||
{
|
||||
int rc = Syscall::invoke(Syscall::SC_sigpending, (dword)set);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
const char* sys_siglist[NSIG] = {
|
||||
#undef __SIGNAL
|
||||
#define __SIGNAL(a, b) b,
|
||||
|
@ -78,5 +90,4 @@ const char* sys_siglist[NSIG] = {
|
|||
#undef __SIGNAL
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue