I don't think you have much of a need of Spork for this. You can use some of the utility code that spork provides, such as Spork::Forker.
Several usage examples in the specs:
https://github.com/sporkrb/spork/blob/master/spec/spork/forker_spec.rb
The Forker class helps because while it runs the block you provide in a separate, forked process, the return value of the block is serialized via Marshal.dump and communicated back to the parent process over a mutually shared IO stream, allowing you to wait for the process to complete and retrieve it's result.
Tim
> --
> You received this message because you are subscribed to the Google Groups "sporkgem" group.
> To post to this group, send email to spor...@googlegroups.com.
> To unsubscribe from this group, send email to sporkgem+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sporkgem?hl=en.
>
You may just want to extract that bit of code out since you're theoretically using a support library from Spork not entirely intended to be exposed for usage :) Or continue to require Spork just for the one class… either way, I'm glad you found the Forker class useful.
Tim