[Date Prev][Date Next]
Re: (ITS#8118) [PATCH] tool_write_ldif: flush stdout
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#8118) [PATCH] tool_write_ldif: flush stdout
- From: email@example.com
- Date: Wed, 29 Apr 2015 17:17:10 +0000
- Auto-submitted: auto-generated (OpenLDAP-ITS)
> 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) (184.108.40.206)
> 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.
That totally defeats the purpose of using stdio - which is, to generate
buffered output and avoid excessive numbers of system calls.
Rejecting this patch. A more suitable patch might be one that flushes
once when all currently available messages have been processed in
ldapsearch.c. I.e., after the for-loop in dosearch() completes.
> 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 <firstname.lastname@example.org>. 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.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/