|
|
|
|||||
|
How does stderr/stdout redirection work?
One of the Ice servers in the system I'm currently working on is a weird Java/SWI-prolog hybrid. If I redirect the output from that server using any of the Ice redirection properties (e.g., IceGrid.Node.Output), only the messages that are printed from the Java side show up in the logs; the messages that are directly printed by Prolog seem to vanish into the ether somehow.
If I run the program from the command line, using exactly the same executable values and environment as in Ice and with output redirection, I get the full output in the files. I mean, I do something like this (where "pl" is the Prolog executable; using a bash shell on linux): Quote:
Is there anything obvious I should check to see what's going on here? Thanks, MEF
__________________
Mary Ellen Foster Technical University of Munich JAST human-robot dialogue system Maintainer of Fedora Ice packages |
|
|||||
|
Quote:
For posterity, here's the solution I'm now using to capture all redirected output: after the Ice communicator has been initialised (in Java), I test whether the Ice.StdErr and/or Ice.StdOut properties exist. If they do, then I explicitly redirect the stderr and stdout in Prolog to files with similar names to the Ice files. (I originally thought of just redirecting prolog stdout to the *same* files, but that's probably a recipe for corrupting the output ...) MEF
__________________
Mary Ellen Foster Technical University of Munich JAST human-robot dialogue system Maintainer of Fedora Ice packages |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| dumpdb output to STDERR? | ctennis | Comments | 0 | 09-07-2007 03:07 PM |
| icegridadmin.exe/IceGridGUI.jar 3.2b retrieve stdout/err bug | mpugach | Bug Reports | 1 | 03-05-2007 03:25 AM |
| Multiple Layers of Redirection in IceGrid | zhi | Help Center | 1 | 11-22-2006 04:28 AM |
| My Ice Stats doesn't work?? | billwillman | Help Center | 6 | 10-03-2006 11:46 PM |
| This should work! | catalin | Help Center | 3 | 12-11-2003 03:24 PM |