[OpenSRF-GIT] OpenSRF branch master updated. 6f1daba1493011a8b01cd80d29a68976c24c7010

Evergreen Git git at git.evergreen-ils.org
Wed Jun 24 09:44:44 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "OpenSRF".

The branch, master has been updated
       via  6f1daba1493011a8b01cd80d29a68976c24c7010 (commit)
      from  cc1f6ee9349584f7ec7b6f16861805a43f7161d6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6f1daba1493011a8b01cd80d29a68976c24c7010
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Wed Jun 3 17:42:06 2015 +0000

    LP#1461625: ensure srfsh doesn't close STDOUT prematurely
    
    Ensure that when running srfsh in non-interactive mode
    that reads commands directly from a file, (i.e.,
    "srfsh script.srfsh" or as a shebang script), it does
    not close STDOUT after handling the first request.
    
    To test
    -------
    [1] Create a srfsh script containing:
    
        request opensrf.math opensrf.system.echo "foo"
        request opensrf.math opensrf.system.echo "bar"
    
    [2] Run "srfsh script.srfsh". Note that only the
        results of the first echo request are output.
    [3] Apply the patch and recompile, then run
        "srfsh script.srfsh" again.  This time, the
        output of both requests is displayed.
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/src/srfsh/srfsh.c b/src/srfsh/srfsh.c
index 753180b..a383492 100644
--- a/src/srfsh/srfsh.c
+++ b/src/srfsh/srfsh.c
@@ -918,7 +918,7 @@ int send_request( const char* server,
 	fprintf(less, "Request Time in seconds: %.6f\n", end - start );
 	fputs("------------------------------------\n", less);
 
-	pclose(less);
+	if(!is_from_script) pclose(less);
 
 	osrf_app_session_request_finish( session, req_id );
 

-----------------------------------------------------------------------

Summary of changes:
 src/srfsh/srfsh.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
OpenSRF


More information about the opensrf-commits mailing list