diff options
Diffstat (limited to 'Kernel/Syscalls/ptrace.cpp')
-rw-r--r-- | Kernel/Syscalls/ptrace.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Kernel/Syscalls/ptrace.cpp b/Kernel/Syscalls/ptrace.cpp index f380921834..1b9695f410 100644 --- a/Kernel/Syscalls/ptrace.cpp +++ b/Kernel/Syscalls/ptrace.cpp @@ -51,7 +51,9 @@ static KResultOr<u32> handle_ptrace(const Kernel::Syscall::SC_ptrace_params& par if (peer_process.tracer()) { return EBUSY; } - peer_process.start_tracing_from(caller.pid()); + auto result = peer_process.start_tracing_from(caller.pid()); + if (result.is_error()) + return result.error(); ScopedSpinLock lock(peer->get_lock()); if (peer->state() != Thread::State::Stopped) { peer->send_signal(SIGSTOP, &caller); |