|
|
Subscribe / Log in / New account

Filesystem notification, part 2: A deeper investigation of inotify

Filesystem notification, part 2: A deeper investigation of inotify

Posted Aug 6, 2014 13:23 UTC (Wed) by poruid (guest, #15924)
Parent article: Filesystem notification, part 2: A deeper investigation of inotify

Small question (irrelevant for the quintessence of this instructive article).
Why is the call to exit() in the sample code put into an else branch when the if branch unconditionally executes a return?


to post comments

Filesystem notification, part 2: A deeper investigation of inotify

Posted Aug 7, 2014 9:05 UTC (Thu) by mkerrisk (subscriber, #1978) [Link]

They're both equivalent, of course. The form I used feels slightly more natural (to me). If I'd done it the other way, I'd probably rather have written:
if (errno != ENOENT)
    exit(EXIT_FAILURE);

return 0;


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds