bozo: Use buffered I/O to send notifier data 18/14818/8
authorMichael Meffie <mmeffie@sinenomine.net>
Wed, 23 Jun 2021 18:51:52 +0000 (14:51 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Thu, 28 Jul 2022 04:16:48 +0000 (00:16 -0400)
commit2cf295c3675fb5491f27fed237a29a8497547f8d
tree92a29e1ab0565537c51cd2e5b6c25030f8efd934
parentc2cb5e98c3b4bd27d3481317935211554e2fe2ea
bozo: Use buffered I/O to send notifier data

Currently, popen() is used to open a pipe to the notifier program, then
notifier messages are formatted in memory then sent with unbuffered I/O,
then the pipe is immediately closed.

Instead of allocating buffers and formatting the notifier string, just
use the buffered stream.  Check for write errors with ferror(), and do
not ignore the pclose() return code.

Change-Id: Ib2bd692591171b4f380fc25bec56d4db898d883e
Reviewed-on: https://gerrit.openafs.org/14818
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/bozo/bnode.c