summaryrefslogtreecommitdiff
path: root/kernel/scalls/sigaction.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2023-10-30 22:44:02 +0100
committerAnton Kling <anton@kling.gg>2023-10-31 00:18:38 +0100
commit34342b53c39aa3f22326b6e4eda960cc20cfa0f0 (patch)
tree01bc4fcbc78623e406bcfa45dd9bd04ebd915663 /kernel/scalls/sigaction.c
parent8a9208612eec8ddae4c418485d848ecfa0613699 (diff)
Meta: Create simple build scripts for kernel, userland and general enviroment
Diffstat (limited to 'kernel/scalls/sigaction.c')
-rw-r--r--kernel/scalls/sigaction.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/scalls/sigaction.c b/kernel/scalls/sigaction.c
new file mode 100644
index 0000000..0166fab
--- /dev/null
+++ b/kernel/scalls/sigaction.c
@@ -0,0 +1,9 @@
+#include <scalls/sigaction.h>
+#include <signal.h>
+#include <sched/scheduler.h>
+
+int syscall_sigaction(int sig, const struct sigaction *restrict act,
+ struct sigaction *restrict oact) {
+ set_signal_handler(sig, act->sa_handler);
+ return 0;
+}