Is a successful call to write(2) atomic?

Doug Hardie bc979 at lafn.org
Wed Jun 16 22:17:15 UTC 2021


My approach to this problem was to create a daemon that listened to a named pipe.  It then wrote the data to the file.  This approach has the advantage that the calling process is not waiting for the daemon to complete.  In my case, the data was retrieved form a database by the daemon so that the calling process only had to send a unique id for the specific record.  However, I have also used this approach to send email and the calling process had to send the email text as well as the header info.  The text messages were fairly short so didn't run into any size limits on the pipe.

-- Doug




More information about the freebsd-questions mailing list