Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: open3 buffering in linux vs. os x

by ikegami (Patriarch)
on Jan 09, 2009 at 06:04 UTC ( [id://735092]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://735092]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-18 01:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found