E
Emmanuel Emmanuel
This is my problem :
Let's say I have a ruby script which first takes as an input a ruby
script (that could be anything, and that I don't control) and evals it
using the eval ruby command and proceeds to some computations.
Now the evaluation of the inputed script can take very long.... I would
like to be able to interrupt it (i.e., interrupt the eval command),
ideally from another ruby process, raising an exception that could be
trapped by my first process so the evaluation could be skipped and the
process could proceed to the other computations.
I could send a SIGINT (in C) to the first process ? And trap this signal
in ruby in the first process...
I guess that should work (can I send it in ruby ? what os the command ?)
?
However, If I understand correctly, that will not work on Windows
platform....
What is the solution ?
ANy idea ?
Thank you
Emmanuel
Let's say I have a ruby script which first takes as an input a ruby
script (that could be anything, and that I don't control) and evals it
using the eval ruby command and proceeds to some computations.
Now the evaluation of the inputed script can take very long.... I would
like to be able to interrupt it (i.e., interrupt the eval command),
ideally from another ruby process, raising an exception that could be
trapped by my first process so the evaluation could be skipped and the
process could proceed to the other computations.
I could send a SIGINT (in C) to the first process ? And trap this signal
in ruby in the first process...
I guess that should work (can I send it in ruby ? what os the command ?)
?
However, If I understand correctly, that will not work on Windows
platform....
What is the solution ?
ANy idea ?
Thank you
Emmanuel