mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
Kernel: Remove "restorer" field from SignalActionData.
I was originally implementing signals by looking at some man page about sigaction() to see how it works. It seems like the restorer thingy is system-specific and not required by POSIX, so let's get rid of it.
This commit is contained in:
parent
5562ab3f5a
commit
5f63f8120c
6 changed files with 0 additions and 7 deletions
|
@ -1601,10 +1601,8 @@ int Process::sys$sigaction(int signum, const sigaction* act, sigaction* old_act)
|
|||
if (!validate_write_typed(old_act))
|
||||
return -EFAULT;
|
||||
old_act->sa_flags = action.flags;
|
||||
old_act->sa_restorer = (decltype(old_act->sa_restorer))action.restorer.get();
|
||||
old_act->sa_sigaction = (decltype(old_act->sa_sigaction))action.handler_or_sigaction.get();
|
||||
}
|
||||
action.restorer = LinearAddress((dword)act->sa_restorer);
|
||||
action.flags = act->sa_flags;
|
||||
action.handler_or_sigaction = LinearAddress((dword)act->sa_sigaction);
|
||||
return 0;
|
||||
|
|
|
@ -21,7 +21,6 @@ struct SignalActionData {
|
|||
LinearAddress handler_or_sigaction;
|
||||
dword mask { 0 };
|
||||
int flags { 0 };
|
||||
LinearAddress restorer;
|
||||
};
|
||||
|
||||
class Thread : public InlineLinkedListNode<Thread> {
|
||||
|
|
|
@ -246,7 +246,6 @@ struct sigaction {
|
|||
};
|
||||
sigset_t sa_mask;
|
||||
int sa_flags;
|
||||
void (*sa_restorer)(void);
|
||||
};
|
||||
|
||||
#define SA_NOCLDSTOP 1
|
||||
|
|
|
@ -33,7 +33,6 @@ sighandler_t signal(int signum, sighandler_t handler)
|
|||
new_act.sa_handler = handler;
|
||||
new_act.sa_flags = 0;
|
||||
new_act.sa_mask = 0;
|
||||
new_act.sa_restorer = nullptr;
|
||||
int rc = sigaction(signum, &new_act, &old_act);
|
||||
if (rc < 0)
|
||||
return SIG_ERR;
|
||||
|
|
|
@ -19,7 +19,6 @@ struct sigaction {
|
|||
};
|
||||
sigset_t sa_mask;
|
||||
int sa_flags;
|
||||
void (*sa_restorer)(void);
|
||||
};
|
||||
|
||||
int kill(pid_t, int sig);
|
||||
|
|
|
@ -232,7 +232,6 @@ int main(int argc, char** argv)
|
|||
sa.sa_handler = handle_sigint;
|
||||
sa.sa_flags = 0;
|
||||
sa.sa_mask = 0;
|
||||
sa.sa_restorer = nullptr;
|
||||
int rc = sigaction(SIGINT, &sa, nullptr);
|
||||
assert(rc == 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue