Victor 'Zverok' Shepelev wrote:
> Hi all.
>
> The question first seemed simple for me, but after hour of manual-reading
> and googling I still have no answer.
>
> The question: on Windows, how do I run some program and return immediately?
> I mean, something like
>
> system('blah.exe') #blah is long packet program, I want system to return
> immediately after blah.exe loaded, not after it was ended.
>
> Thanks.
>
> Zve
>   

One way:

t = Thread.new do
    system("blah.exe")
end

#do other stuff

t.join

Traditional fork and exec way:

child_pid = fork
exec("blah.exe") unless child_pid

#do stuff

Process.wait     # or Process.detach


I believe this should work fine on Windows.

-Justin