fanotify.7: Add some comments to example code

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-04-25 11:57:29 +02:00
parent 616fce491b
commit e1ca5880d4
1 changed files with 4 additions and 3 deletions

View File

@ -652,9 +652,10 @@ main(int argc, char *argv[])
while (1) { while (1) {
poll_num = poll(fds, nfds, \-1); poll_num = poll(fds, nfds, \-1);
if (poll_num == \-1) { if (poll_num == \-1) {
if (errno == EINTR) if (errno == EINTR) /* Interrupted by a signal */
continue; continue; /* Restart poll() */
perror("poll");
perror("poll"); /* Unexpected error */
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
if (poll_num > 0) { if (poll_num > 0) {