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:
Michael Kerrisk 2014-04-25 10:01:27 +02:00
parent f776794974
commit 8cc4f7a94e
1 changed files with 0 additions and 4 deletions

View File

@ -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);
}