| 340 | } |
| 341 | |
| 342 | [[nodiscard]] auto sys_sigaction(int signum, SignalHandler handler) -> int { |
| 343 | SignalAction action; |
| 344 | action.handler = handler; |
| 345 | auto result = |
| 346 | TaskManagerSingleton::instance().SetSignalAction(signum, action, nullptr); |
| 347 | if (!result.has_value()) { |
| 348 | klog::Err("[Syscall] sys_sigaction failed: {}", result.error().message()); |
| 349 | return -1; |
| 350 | } |
| 351 | return 0; |
| 352 | } |
| 353 | |
| 354 | [[nodiscard]] auto sys_sigprocmask(int how, uint32_t set, uint32_t* oldset) |
| 355 | -> int { |