Revision: 76821
          http://sourceforge.net/p/brlcad/code/76821
Author:   starseeker
Date:     2020-08-18 02:28:28 +0000 (Tue, 18 Aug 2020)
Log Message:
-----------
Listen for both stdout and stderr output from the rt tools - this gets the 
summary in MGED GUI mode, but we still don't get anything at all in classic 
mode.  Not sure why yet.  tclcad_create_io_handler is being called, but 
Tcl_CreateFileHandler is never triggered so _ged_rt_output_handler isn't 
called.  Apparently this was also true in 72189, as the output is printed 
without the callback ever being triggered there as well...

Modified Paths:
--------------
    brlcad/trunk/src/libged/ged_util.c

Modified: brlcad/trunk/src/libged/ged_util.c
===================================================================
--- brlcad/trunk/src/libged/ged_util.c  2020-08-17 17:47:52 UTC (rev 76820)
+++ brlcad/trunk/src/libged/ged_util.c  2020-08-18 02:28:28 UTC (rev 76821)
@@ -1351,7 +1351,9 @@
 
     /* Get data from rt */
     if (bu_process_read((char *)line, &count, rrtp->p, BU_PROCESS_STDERR, 
RT_MAXLINE) <= 0) {
-       read_failed = 1;
+       if (bu_process_read((char *)line, &count, rrtp->p, BU_PROCESS_STDOUT, 
RT_MAXLINE) <= 0) {
+           read_failed = 1;
+       }
     }
 
     if (read_failed) {
@@ -1360,6 +1362,7 @@
        /* Done watching for output, undo subprocess I/O hooks. */
        if (gedp->ged_delete_io_handler) {
            (*gedp->ged_delete_io_handler)(rrtp, BU_PROCESS_STDERR);
+           (*gedp->ged_delete_io_handler)(rrtp, BU_PROCESS_STDOUT);
        }
 
 
@@ -1491,6 +1494,7 @@
     /* If we know how, set up hooks so the parent process knows to watch for 
output. */
     if (gedp->ged_create_io_handler) {
        (*gedp->ged_create_io_handler)(run_rtp, BU_PROCESS_STDERR, 
_ged_rt_output_handler, (void *)run_rtp);
+       (*gedp->ged_create_io_handler)(run_rtp, BU_PROCESS_STDERR, 
_ged_rt_output_handler, (void *)run_rtp);
     }
     return GED_OK;
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to