Re: POpen, opening lots of processes

2004-01-12 Thread Ferenc Wagner
Tomasz Zielonka [EMAIL PROTECTED] writes: On Sun, Jan 11, 2004 at 10:22:09PM +0100, Ferenc Wagner wrote: It isn't suitable for exchanging bigger amounts of data between processes. May I ask why? Well, if you were collecting big amounts of data (like dozens of megabytes) from the child

Re: POpen, opening lots of processes

2004-01-11 Thread Ferenc Wagner
Tomasz Zielonka [EMAIL PROTECTED] writes: On Sat, Jan 10, 2004 at 04:50:28PM -0500, Mark Carroll wrote: Your code looks great, Thanks :) It isn't suitable for exchanging bigger amounts of data between processes. May I ask why? Feri. ___

Re: POpen, opening lots of processes

2004-01-10 Thread Mark Carroll
Tomasz, Your code looks great, but where do you find the library documentation, like what the arguments for executeFile are all about? (I'd guessed the Maybe thing was an environment, but what's the Bool?) I've been trying to do similar stuff, but have been stumbling in the dark rather. --

Re: POpen, opening lots of processes

2004-01-10 Thread Glynn Clements
Mark Carroll wrote: Your code looks great, but where do you find the library documentation, like what the arguments for executeFile are all about? (I'd guessed the Maybe thing was an environment, but what's the Bool?) I've been trying to do similar stuff, but have been stumbling in the

Re: POpen, opening lots of processes

2004-01-10 Thread Tomasz Zielonka
On Sat, Jan 10, 2004 at 04:50:28PM -0500, Mark Carroll wrote: Tomasz, Your code looks great, Thanks :) It was written in haste for a particular purpose and then tweaked a bit, so I would be pleasantly surprised if it didn't contain any bugs (besides the one mentioned in code). It isn't

Re: POpen, opening lots of processes

2004-01-09 Thread Tomasz Zielonka
On Thu, Jan 08, 2004 at 09:33:29AM -0800, Hal Daume III wrote: Hi, I'm using POpen to shell out to a command several hundreds or thousands of times per call (none of them simultaneous, though, this is completely serial). After running my program for a while, I get: Fail: resource

Re: POpen, opening lots of processes

2004-01-09 Thread Ferenc Wagner
Tomasz Zielonka [EMAIL PROTECTED] writes: I had a similar problem, and finally I created my own solution that doesn't leave zombies and doesn't block when the launched process writes too much to stderr. Pretty neat, I've got an application idea for that code! Couldn't it be include in the

RE: POpen, opening lots of processes

2004-01-09 Thread Simon Marlow
Tomasz Zielonka [EMAIL PROTECTED] writes: I had a similar problem, and finally I created my own solution that doesn't leave zombies and doesn't block when the launched process writes too much to stderr. Pretty neat, I've got an application idea for that code! Couldn't it be include

Re: POpen, opening lots of processes

2004-01-09 Thread Ferenc Wagner
Simon Marlow [EMAIL PROTECTED] writes: Tomasz Zielonka [EMAIL PROTECTED] writes: I had a similar problem, and finally I created my own solution that doesn't leave zombies and doesn't block when the launched process writes too much to stderr. Pretty neat, I've got an application idea for

RE: POpen, opening lots of processes

2004-01-09 Thread Simon Marlow
There is an outstanding proposal for a System.Process library: http://www.haskell.org/~simonmar/System.Process.html This is currently stalled because we need a non-blocking implementation of getProcessStatus (which is in the pipeline). Something akin to Tomasz's launch could also

Re: POpen, opening lots of processes

2004-01-08 Thread Glynn Clements
Hal Daume III wrote: I'm using POpen to shell out to a command several hundreds or thousands of times per call (none of them simultaneous, though, this is completely serial). After running my program for a while, I get: Fail: resource exhausted Action: forkProcess Reason: Resource

Re: POpen, opening lots of processes

2004-01-08 Thread Ferenc Wagner
Hal Daume III [EMAIL PROTECTED] writes: On Thu, 8 Jan 2004, Glynn Clements wrote: What does the output from ps indicate? It lists all the processes as defunct: 19981 pts/5Z 0:00 [suffixtree defunct] 19982 pts/5Z 0:00 [suffixtree defunct] 19983 pts/5Z 0:00

Re: POpen, opening lots of processes

2004-01-08 Thread Glynn Clements
Hal Daume III wrote: What does the output from ps indicate? It lists all the processes as defunct: 19981 pts/5Z 0:00 [suffixtree defunct] 19982 pts/5Z 0:00 [suffixtree defunct] 19983 pts/5Z 0:00 [suffixtree defunct] 19984 pts/5Z 0:00 [suffixtree