mirror of https://github.com/mkerrisk/man-pages
fanotify.7: Clarify logic in ESTALE check
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
6f10bd3260
commit
2d26ddfa55
|
@ -1065,13 +1065,15 @@ main(int argc, char **argv)
|
|||
deleted for the object prior to this system call. */
|
||||
|
||||
event_fd = open_by_handle_at(AT_FDCWD, file_handle, O_RDONLY);
|
||||
if (ret == \-1 && errno == ESTALE) {
|
||||
printf("File handle is no longer valid. "
|
||||
"File has been deleted\e\n");
|
||||
continue;
|
||||
} else if (ret == \-1) {
|
||||
perror("open_by_handle_at");
|
||||
exit(EXIT_FAILURE);
|
||||
if (ret == \-1) {
|
||||
if (errno == ESTALE) {
|
||||
printf("File handle is no longer valid. "
|
||||
"File has been deleted\e\n");
|
||||
continue;
|
||||
} else {
|
||||
perror("open_by_handle_at");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
snprintf(procfd_path, sizeof(procfd_path), "/proc/self/fd/%d",
|
||||
|
|
Loading…
Reference in New Issue