[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#8118) [PATCH] tool_write_ldif: flush stdout



Full_Name: Thomas Cort
Version: HEAD
OS: Mac OS X 10.10.3
URL: ftp://ftp.openldap.org/incoming/thomas-cort-150429.patch
Submission from: (NULL) (96.46.34.154)


The LDIF output wasn't being explicitly flushed. In certain scenarios,
such as piping the output of a persistent ldapsearch to node.js v0.12
on Mac OS X 10.10.3, the output is unavailable to the process
consuming the search results until some operating system limit is
reached (8192 bytes for example) and it is automatically flushed.
This can leave the tail end of persistent search results in an operating
system buffer for a long time (until enough output has accumulated
for the OS to flush it).

Explicitly call flush so that the output is immediately available.

I uploaded the patch to ftp.openldap.org as thomas-cort-150429.patch

The attached patch file is derived from OpenLDAP Software. All of the
modifications to OpenLDAP Software represented in the following patch(es) were
developed by Thomas Cort <linuxgeek@gmail.com>. I have not assigned rights
and/or interest in this work to any party.

I, Thomas Cort, hereby place the following modifications to OpenLDAP Software
(and only these modifications) into the public domain. Hence, these
modifications may be freely used and/or redistributed for any purpose with or
without attribution and/or other notice.