Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Backticks and SIGALRM

by moritz (Cardinal)
on Aug 20, 2007 at 12:03 UTC ( [id://633781]=note: print w/replies, xml ) Need Help??


in reply to Backticks and SIGALRM

I would also like to see a good solution to that problem.

I worked around it the other day by

  1. forking
  2. Setting execution time limit in the child with BSD::Resource
  3. writing result to a temporary file
  4. in the parent, wait for the child and read the temp file

This is rather messy (and probably not very secure because the handling of temporary files is tricky). And I couldn't find a sandbox executer on cpan :(

BTW I needed that mess for an evalbot for #perl6.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-24 06:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found