From e1ca5880d4911a107e24c6f004275e2a66ebc3cd Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 25 Apr 2014 11:57:29 +0200 Subject: [PATCH] fanotify.7: Add some comments to example code Signed-off-by: Michael Kerrisk --- man7/fanotify.7 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/man7/fanotify.7 b/man7/fanotify.7 index 4877a9b6b..d03099172 100644 --- a/man7/fanotify.7 +++ b/man7/fanotify.7 @@ -652,9 +652,10 @@ main(int argc, char *argv[]) while (1) { poll_num = poll(fds, nfds, \-1); if (poll_num == \-1) { - if (errno == EINTR) - continue; - perror("poll"); + if (errno == EINTR) /* Interrupted by a signal */ + continue; /* Restart poll() */ + + perror("poll"); /* Unexpected error */ exit(EXIT_FAILURE); } if (poll_num > 0) {