Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jun 2021 15:17:07 -0700
From:      Doug Hardie <bc979@lafn.org>
To:        freeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: Is a successful call to write(2) atomic?
Message-ID:  <331B1E28-0643-4F85-8682-C2C04235C6BF@sermon-archive.info>
In-Reply-To: <7801a6e8-2428-619e-5722-7317841595a1@qeng-ho.org>
References:  <26258.1623802141@segfault.tristatelogic.com> <7801a6e8-2428-619e-5722-7317841595a1@qeng-ho.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?331B1E28-0643-4F85-8682-C2C04235C6BF>