I am having difficulty reading the output from a shell command when it is generated. Something somewhere seems to be storing the messages until it is ready to give them to my READ and ERROR event handlers.
The command is invoked with: JCap = Shell Command For Read As "Jack_Capture" My Jack_Capture_Read() procedure has used both Read #Last, item, 0 - Lof(Last) and Line Input #Last, item The Jack_Capture_Error(item As String) procedure has no choice - it gets what it is given. The console output from the shell command has been checked and all of the print_message(String) commands in the C source are '\n' terminated. The shell command produces progress reports as it executes, one per line, and in particular there will often be a delay of several seconds - even minutes - between it issuing the statement "Waiting for JackTransportRolling.\n" and "Received JackTranportRolling. Recording.\n". In practice, the message that the transport is rolling is delayed until the transport is stopped and the READ event gets it at the same time as the ERROR event reports another message. It is a little confusing perhaps, but the shell command produces output on both stdout and stderr and I have to catch both to know the full story about how the recording is progressing. When the same command and parameters are executed in a real terminal then all of the messages appear in sequence at the expected times. Can anyone suggest where these messages might be buffered and how to hurry them along? Thanks Richard ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
