diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-04-20 19:32:14 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-04-20 19:32:14 +0200 |
commit | 5f63f8120ca574609cd7407bbb12dd625a67c061 (patch) | |
tree | 13a1d7cbf8888f42b86b7c3bb6737df6c60b0528 | |
parent | 5562ab3f5ac46066e240b2cdacbb8aaa99932b25 (diff) | |
download | serenity-5f63f8120ca574609cd7407bbb12dd625a67c061.zip |
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.
-rw-r--r-- | Kernel/Process.cpp | 2 | ||||
-rw-r--r-- | Kernel/Thread.h | 1 | ||||
-rw-r--r-- | Kernel/UnixTypes.h | 1 | ||||
-rw-r--r-- | LibC/signal.cpp | 1 | ||||
-rw-r--r-- | LibC/signal.h | 1 | ||||
-rw-r--r-- | Userland/sh.cpp | 1 |
6 files changed, 0 insertions, 7 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 4a130e3420..c80b36cd39 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -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; diff --git a/Kernel/Thread.h b/Kernel/Thread.h index f974c91619..641f1443d5 100644 --- a/Kernel/Thread.h +++ b/Kernel/Thread.h @@ -21,7 +21,6 @@ struct SignalActionData { LinearAddress handler_or_sigaction; dword mask { 0 }; int flags { 0 }; - LinearAddress restorer; }; class Thread : public InlineLinkedListNode<Thread> { diff --git a/Kernel/UnixTypes.h b/Kernel/UnixTypes.h index a941f6c340..4261f8ad61 100644 --- a/Kernel/UnixTypes.h +++ b/Kernel/UnixTypes.h @@ -246,7 +246,6 @@ struct sigaction { }; sigset_t sa_mask; int sa_flags; - void (*sa_restorer)(void); }; #define SA_NOCLDSTOP 1 diff --git a/LibC/signal.cpp b/LibC/signal.cpp index ec2d8c2767..859d0d054b 100644 --- a/LibC/signal.cpp +++ b/LibC/signal.cpp @@ -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; diff --git a/LibC/signal.h b/LibC/signal.h index e854b7ed0b..2bd8a888df 100644 --- a/LibC/signal.h +++ b/LibC/signal.h @@ -19,7 +19,6 @@ struct sigaction { }; sigset_t sa_mask; int sa_flags; - void (*sa_restorer)(void); }; int kill(pid_t, int sig); diff --git a/Userland/sh.cpp b/Userland/sh.cpp index e4f926cb00..f210f64013 100644 --- a/Userland/sh.cpp +++ b/Userland/sh.cpp @@ -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); } |