JosiahWI commented on code in PR #11526: URL: https://github.com/apache/trafficserver/pull/11526#discussion_r1670660872
########## src/tscore/ink_file.cc: ########## @@ -42,6 +42,21 @@ using ioctl_arg_t = union { off_t off; }; +/** Open and possibly create a file. + * + * This is a wrapper for the POSIX open() call that will retry the call if a + * transient error occurs. + */ +int +safe_open(char const *path, int oflag, mode_t mode) +{ + int r{-1}; + do { + r = open(path, oflag, mode); + } while ((r < 0) && (errno == EINTR)); Review Comment: The `ENOBUFS` error code isn't checked because it's not documented as a possible error condition for `open()`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@trafficserver.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org