>sorry, i can not use sleep because the subprocess still should work not just 
sleep.
===== Original Message From ruby-talk / ruby-lang.org =====
>Maggie Xiao (mxiao / ee.ualberta.ca) wrote:
>[...]
>>  I should construct a program which should wait for the specified time
>>  and then print out the specified message. Meanwhile control of the
>>  shell should be returned to the user. ie. The program must be
>>  non-blocking. is there any way to construct it in pure ruby way? Or
>>  my only way is to using extending ruby with c?
>
>Is the following what you are looking for?
>
>if fork then
>  # parent process
>  exit!
>else
>  # child process
>  sleep 10
>  puts "Now!"
>end
>
>			Reimer Behrends