Skip to content

fix: dev: Check the result of dirfd() before calling unlinkat()

Ondřej Surý requested to merge 4853-check-result-of-dirfd-in-isc_log into main

Instead of directly using the result of dirfd() in the unlinkat() call, check whether the returned file descriptor is actually valid. That doesn't really change the logic as the unlinkat() would fail with invalid descriptor anyway, but this is cleaner and will report the right error returned directly by dirfd() instead of EBADF from unlinkat().

Closes #4853 (closed)

Merge request reports