Getting output from/Sending input to a process

BlitzMax Forums/BlitzMax Programming/Getting output from/Sending input to a process

William Drescher(Posted 2010) [#1]
I have a debugger for an IDE and I need to pull in the output and send input to the program that is being debugged, much like BlitzMax does. I looked through the MaxIDE source code and I'm thoroughly stumped on the whole thing.

Can someone please simplify the process of doing this through a text area gadget please?


Czar Flavius(Posted 2010) [#2]
Ziggy has his own debugger in Blide, he might be able to offer advice.


ziggy(Posted 2010) [#3]
You have to launch the 'child' program as a process and use standard input pipe and standard output pipe to send/get the data. Also, be sure to flush the pipes freqüently and do it from different threads if you want to have a non-blocking access to the pipes data. It may sound complicated, but it is very easy to do if you use the freeprocess library from blitzmax (it is included in the default distribution).

I recommend you to take another look to the MaxIde source code, it is not as complicated as it may seem once you get used to all the methods, functions and general usage of the freeprocess library.

EDIT: Usually, debug info goes throug standard error pipe, instead of using standard output pipe

Last edited 2010