2
0
mirror of https://github.com/boostorg/process.git synced 2026-01-19 04:22:15 +00:00

Failed pidfd_open causes an exception

Closes #513.
This commit is contained in:
Klemens Morgenstern
2025-09-07 17:42:03 +08:00
parent 1765cd57bb
commit 1bfe21baa3

View File

@@ -69,6 +69,8 @@ struct basic_process_handle_fd
basic_process_handle_fd(executor_type executor, pid_type pid)
: pid_(pid), descriptor_(executor, syscall(SYS_pidfd_open, pid, 0))
{
if (descriptor_.native_handle() == -1)
detail::throw_error(detail::get_last_error(), "wait(pid)");
}
basic_process_handle_fd(executor_type executor, pid_type pid, native_handle_type process_handle)