Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] src/libcrun: fix error handling in libcrun_kill_linux #1535

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libcrun/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -5618,7 +5618,7 @@ libcrun_kill_linux (libcrun_container_status_t *status, int signal, libcrun_erro
if (errno == ENOSYS)
return libcrun_kill_linux_no_pidfd (status, true, signal, err);
if (errno == ESRCH)
return crun_make_error (err, 0, "container not running");
return crun_make_error (err, errno, "container not running");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This address CI failures, but is there a way to customize this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@giuseppe Any thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

container_delete_internal ignores ESRCH. I think there is no harm in having it in the error code


return crun_make_error (err, errno, "open pidfd");
}
Expand Down
Loading