in reply to open3 buffering in linux vs. os x

Buffering is done at the application level, not at the system level, so you can't control whether another application (ProFit) buffers its output or not. Even if it's your child.

Many applications (including perl), buffer STDOUT when it's not connected to a terminal. So the trick is to convince ProFit that it's connected to a terminal. That's where pseudo ttys come in.

Replies are listed 'Best First'.
Re^2: open3 buffering in linux vs. os x
by salva (Canon) on Jan 09, 2009 at 09:21 UTC
    Let me add that some applications accept a command line flag to force interactive mode even when they are not connected to a tty.

    So Lexicon, before going the IO::Pty or Expect way, check in the application manual for that flag!

    BTW, ptys are not reliable in some operating systems as for instance AIX or HP-UX. You can overflow them and data will be silently dropped.