Skip to content

Commit

Permalink
don't error on permission denied hookerror (#2435)
Browse files Browse the repository at this point in the history
* don't error on permission denied hookerror

* ..
  • Loading branch information
aviramha authored May 9, 2024
1 parent 853be85 commit f5987d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/+perm-denied.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Don't print error on permission denied
7 changes: 6 additions & 1 deletion mirrord/layer/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ mod ignore_codes {
/// Error codes from [`libc`] that are **not** hard errors, meaning the operation may progress.
///
/// Prefer using [`is_ignored_code`] instead of relying on this constant.
const IGNORE_ERROR_CODES: [i32; 3] = [libc::EINPROGRESS, libc::EAFNOSUPPORT, libc::EADDRINUSE];
const IGNORE_ERROR_CODES: [i32; 4] = [
libc::EINPROGRESS,
libc::EAFNOSUPPORT,
libc::EADDRINUSE,
libc::EPERM,
];

/// Checks if an error code from some [`libc`] function should be treated as a hard error, or
/// not.
Expand Down

0 comments on commit f5987d1

Please sign in to comment.