mirror of https://github.com/mkerrisk/man-pages
fanotify.7: Remove unneeded close() calls
The fanotify file descriptor will be implicitly closed by process termination, and in any case it was not closed explicitly in all process termination paths. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
f776794974
commit
8cc4f7a94e
|
@ -613,7 +613,6 @@ main(int argc, char *argv[])
|
|||
FAN_OPEN_PERM | FAN_CLOSE_WRITE, \-1,
|
||||
argv[1]) == \-1) {
|
||||
perror("fanotify_mark");
|
||||
close(fd);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
@ -660,9 +659,6 @@ main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
/* Close fanotify file descriptor */
|
||||
|
||||
close(fd);
|
||||
printf("Listening for events stopped.\\n");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue