Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Tue May 5 22:48:28 EDT 2009
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.
> I guess System.Posix.Resource.setResourceLimit sets limits on the
> current process, so I can't use it in the server process. Is it a good
> approach to write some utility program for the server to call that
> setResourceLimit and executes the programs that could misbehave?
An alternative is to forkProcess and have the child setResourceLimit
and then executeFile.
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090505/09e4766e/PGP.bin
More information about the Haskell-Cafe