On 08/26/11 13:13, Evan Laforge wrote:
>>    Mmm, it probably could by replacing popen() with pipe()'s
>>    and fork()/exec(), with select() to watch the stdout/err pipe,
>>    and trapping keystrokes yourself and sending them to the stdin
>>    pipe.
>>
>>    Tricky though. I'd do it myself, but this week is nuts for me
>>    schedule wise.
> 
> Don't you need a pty for that?
> 

        Nah, not for simple stdio.
        Depends on what Matt needs it for though.

        I've done quite a few apps that interact with each
        other bidirectionally thru pipes and over serial
        with the tty stuff turned off.

        As long as you don't deadlock, you're good.
        (non-blocking IO is the key there, or threads).

        If you're just moving characters back and forth,
        pty isn't needed. Even ansi and cursor positioning
        can all be done without a pty.

        But if you're interacting with programs that assume
        a tty, like vi or emacs, or programs that are curses
        based or use terminal ioctl()'s, then you do usually
        need a pty or they won't act well.

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to