Marvin Glker wrote in post #990237:
>
> A better way IMO is to use the #spawn method which calls the external
> process and doesn't wait for it to complete. It immediately returns the> PID of the spawned process. Since Ruby 1.9 this works even on Windows.
>
> Vale,
> Marvin

Hi, Marvin
is #spawn's behavior just similar to fork+exec?
i am not very clear how to change the code to use #spawn instead, could you please give me some sample code to show how to using #spawn instead of fork+exec? thanks!