bneradt commented on a change in pull request #8062:
URL: https://github.com/apache/trafficserver/pull/8062#discussion_r669926103



##########
File path: include/tscore/BaseLogFile.h
##########
@@ -99,6 +99,18 @@ class BaseMetaInfo
 
   void _read_from_file();
   void _write_to_file();
+
+  /** Repeat write calls to fd until all len bytes are written.
+   *
+   * @param[in] fd The file descriptor to write to.
+   * @param[in] buffer The buffer of bytes to write into fd.
+   * @param[in] len The number of bytes in buffer to write into fd.
+   *
+   * @return The number of bytes written or -1 if there was an error writing to
+   * the file descriptor. If -1 is returned, errno should indicate why the
+   * write failed.
+   */
+  int _write_till_buffer_is_drained(int fd, char const *buffer, int len);

Review comment:
       Alan suggested offline adding a `safe_write` method. That's a good idea, 
so I'll look into that.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to