#include <sicstus/sicstus.h> spio_t_error_code SP_flush_output( SP_stream *stream, spio_t_bits flush_options);
Ensure that all buffered data reaches its destination.
The stream to flush. This stream should be open for writing.
The following bits can be set:
If this is set, flush will not wait for data to reach the
disk. See the
SP_FCLOSE_OPTION_NO_FSYNC for more information.
If this is set, the function should return quickly or with
SPIO_E_NOT_SUPPORTED if the stream cannot support
Only flush stream if it has AUTOFLUSH enabled.
On success, all buffered data should have been written and
SPIO_S_NOERR or some other success code returned.
On failure, returns a SPIO error code. Error codes with special meaning
Returned if it is not possible to write more data onto the stream, e.g. some underlying device has been closed.
SP_FLUSH_OUTPUT_OPTION_NONBLOCKING was set but the operation
Some unsupported option, e.g.
SP_FLUSH_OUTPUT_OPTION_NONBLOCKING, was passed.
Other error codes may also be returned.