JosiahWI commented on code in PR #11526: URL: https://github.com/apache/trafficserver/pull/11526#discussion_r1671035313
########## 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)); + return r; +} + Review Comment: I think we wouldn't usually put definitions in the header file unless we think they may be useful to inline. Should we keep this in the header file with the `inline` declaration, then? -- 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