On success the write_fd is set to -1 without closing it, so the caller is
responsible for closing it.
If o_stream_unix_close() is reached with write_fd != -1, it means the write
failed. The write_fd shouldn't be closed in that case either.
This function wasn't actually currently used anywhere.
static void
o_stream_unix_close(struct iostream_private *stream, bool close_parent)
{
- struct unix_ostream *ustream =
- container_of(stream, struct unix_ostream,
- fstream.ostream.iostream);
-
- i_close_fd(&ustream->write_fd);
o_stream_file_close(stream, close_parent);
}