Opened 16 years ago

Closed 15 years ago

Last modified 50 years ago

#227 closed bug (None)

Posix.popen is broken

Reported by: fergus Owned by: nobody
Priority: low Milestone:
Component: hslibs/posix Version: None
Keywords: Cc:
Operating System: Architecture:
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Posix.popen hangs if the input is longer than 4096

For example, attempting to run the attached Haskell
source file will result in the program hanging.  The
program attempts
to use Posix.popen to invoke "cat" without 5000 blank
lines as input.

The problem is that it tries to write to the pipe
before forking.
If there are more than 4096 characters, this will block
until some process reads from the pipe.  But there's
only one process,
so it deadlocks.

Attachments (1)

MyPipe2.2.hs (390 bytes) - added by fergus 16 years ago.

Download all attachments as: .zip

Change History (3)

Changed 16 years ago by fergus

Attachment: MyPipe2.2.hs added

comment:1 Changed 15 years ago by simonmar

Logged In: YES 

Lowering priority; this library is subsumed by
System.Process in GHC 6.4.

comment:2 Changed 15 years ago by simonmar

Status: assignedclosed
Logged In: YES 

Posix.popen is deprecated, replaced by System.Process in 6.4.
Note: See TracTickets for help on using tickets.