You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2006/11/05 00:03:50 UTC

svn commit: r471293 - /lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.charm

Author: marvin
Date: Sat Nov  4 15:03:49 2006
New Revision: 471293

URL: http://svn.apache.org/viewvc?view=rev&rev=471293
Log:
Redirect stdout in addition to stderr with _charm_run (inspired by MSVC7
writing error messages to stdout).

Modified:
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.charm

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.charm?view=diff&rev=471293&r1=471292&r2=471293
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.charm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Core/ModHandler.charm Sat Nov  4 15:03:49 2006
@@ -138,11 +138,16 @@
             strcat( strcat(command, " "), argv[i] );
         }
 
-        /* redirect stderr to /dev/null or equivalent */
+        /* redirect stdout and stderr to /dev/null or equivalent */
         freopen( 
 METAQUOTE;
 
 static char charm_run_code_c[] = METAQUOTE
+             , "w", stdout);
+        freopen( 
+METAQUOTE;
+
+static char charm_run_code_d[] = METAQUOTE
              , "w", stderr);
 
         /* run the commmand and return its value to the parent process */
@@ -159,7 +164,8 @@
     chaz_bool_t compile_succeeded = false;
 
     (void)join_strings(&code, 0, charm_run_code_a, charm_run_code_b, " \"", 
-        os->devnull, "\" ", charm_run_code_c, NULL);
+        os->devnull, "\" ", charm_run_code_c, " \"", os->devnull, "\" ", 
+        charm_run_code_d, NULL);
 
     compile_succeeded = compiler->compile_exe(compiler, "_charm_run.c", 
         "_charm_run", code, strlen(code));