Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^2: Passing argument into STDIN inside reval

by gideondsouza (Pilgrim)
on Feb 12, 2013 at 05:20 UTC ( #1018297=note: print w/replies, xml ) Need Help??

in reply to Re: Passing argument into STDIN inside reval
in thread Passing argument into STDIN inside reval

Hey thanks a ton for your replies and effort!

I guess running the code in a virtual environment is the only way out!

I'm trying to sort of understand and mimic The author says this on his blog :

Evaluator is a simple daemon that runs on a virtual machine, it accepts the code, builds the Perl package and evals it capturing the output with Capture::Tiny. It does some timeout checking and fork limiting of course. The virtual machine (qemu Debian image) allows you to run a real Perl code on a real machine. This can be used when writing advanced tutorials including IO, networking, forks etc (I tried Safe but wanted more freedom). It is reset every hour from a snaphot.

So I' playing about on Amazon EC2 and was thinking of running a new instance that will just evaluate code and return the result. I'm thinking I can use Time::Out to timeout operations, but (1) how do I do a fork limit? (2) Am I pretty safe if I allow any perl code to run but restart my VM every hour or something?

  • Comment on Re^2: Passing argument into STDIN inside reval

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018297]
[jedikaiti]: Hi Monks
[Eily]: Hello trahulprajapati don't hesitate to go straight to creating a new post in Seekers of Perl Wisdom when your question is complex
[jedikaiti]: Pretty!
[Eily]: the fact that you had to divide it into 4 points is a pretty good indicator :)
[Eily]: jedikaiti the intercommunicating life part is fun :)

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2017-06-26 15:30 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (583 votes). Check out past polls.