Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Backticks and SIGALRM

by moritz (Cardinal)
on Aug 20, 2007 at 12:03 UTC ( #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
Node Status?
node history
Node Type: note [id://633781]
help
Chatterbox?
[PriNet]: i think i found the problem, the "source" array that sets the individual key values isn't being cleared, it's keeping the previous values...
[atcroft]: PriNet: You might consider posting a small, self-contained snippet of that segment of your code, and see if someone else has a better idea.....
[atcroft]: PriNet: Ahhh... interesting.
[PriNet]: small would be a problem *heh*... the program reads all the lines from a pdf and converts the individual colum data to a seperate key/value pair... that's where the "previous" array from the pdf is not being cleared properly before reading the next pdf
[atcroft]: PriNet: It was a thought....

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2017-06-28 03:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (619 votes). Check out past polls.