[Haskell-cafe] setResourceLimit

brian at lorf.org brian at lorf.org
Wed May 6 16:18:37 EDT 2009


On Tuesday, 05.05.09 at 22:48, Brandon S. Allbery KF8NH wrote:
> On May 5, 2009, at 04:52 , brian at lorf.org wrote:
>> I have a long-lived multithreaded server process that needs to execute
>> programs and interact with them via Handles. The programs could
>> misbehave, like loop or hang, so I need to limit the real and CPU time
>> they can take.
>>
> An alternative is to forkProcess and have the child setResourceLimit and
> then executeFile.

The documentation for forkProcess seems to say that Handle-based I/O
won't work in the child process. I need to communicate with the program
I'm running via its standard input and output. Does this mean
forkProcess is out of the question?


More information about the Haskell-Cafe mailing list