[Gambas-user] Feature request: Redirecting stderr of a program run in a terminal emulator

Benoît Minisini gambas at ...1...
Sun Aug 4 22:08:23 CEST 2013


Le 04/08/2013 20:31, Tobias Boege a écrit :
>>
>> Why does ncurses change the behaviour of the standard error stream? I
>> don't see the reason...
>>
>
> It changes the tty line discipline and stderr just happens to be directed
> to that tty. Normally the tty has the ONLCR bit set when humans operate with
> it which means: translate each incoming newline into a carriage-return-
> newline sequence.
>
> NCurses turns this bit off. Try "stty -onlcr" in a terminal to see the
> result.
>

Maybe you can turn this bit on just after NCurses initialisation?

>> And what do you mean by "redirect the standard error of a program which
>> is run in a terminal emulator back to the console window in the IDE"?
>> This is what is already done for all debugged programs!
>>
>
> AFAICS, when I have the "Use a terminal emulator" setting checked in the
> project options, writing to stderr results in output to the controlling
> terminal (xterm in my case), not to the IDE console.
>
> I have a screenshot attached and the project used to generate the display. I
> hope this makes it clear enough? I'd like to have an option to send the
> strings from Error and Debug to the IDE console, not to the terminal
> emulator.
>
> Regards,
> Tobi
>

The debugged program is entirely under the control of the terminal 
emulator. I don't know how I can tell it to redirect its standard error 
output to the standard error output of the terminal emulator, or 
(better) a specific pipe, so that the IDE gets the data... It should be 
possible with a named pipe, I will try...

-- 
Benoît Minisini




More information about the User mailing list