Mark Slagell wrote:
> Neil, I'm not sure where the array conversion error could come from
> (have you seen it happen?).  If a bogus SIGCHLD signal came through, I
> see that wait2 should still fail with "No child processes,"  but can we
> not trust the OS about that? Under what circumstances would there ever
> be a SIGCHLD signal and no child to go along with it?
> 
>   Mark

Mark, its all probably down to my code,

  This section without the rescue ...
  running from a Tk.Text window started
  and stopped from the keyboard,
  
 
  --------------------------------------

  trap("CLD"){ waitpid( Process.wait2 ) }
       
  producer.child_pid = fork do
     exec{ a midi player }
  end

  ---------------------------------------

  The midi_player is stopped at any time and 
  immediately restarted by...

  ---------------------------------------
  
  system "killall -q #{name of midi_player}"
     
  ---------------------------------------

  The process starts OK, but on trying to kill it
  gives the fatal error, with the trap code before
  or after the fork, so I took the easy way out and
  put in a rescue.  
  
  With Process.wait, Process::WNOHANG)  Gives No child processes   
  and the trace down to tk.rb  
  
  With Process.wait2  Gives Failed to convert Array into integer (TypeError)
  in play ( method name )
  in call, line number of trap("CLD")
  from eval 620 in main loop
  from tk.rb:620:in mainloop

  I remember killing the process via the pid gives the same errors.
  
  On Ruby 1.6.7 (2002.04.24) [i686 Linux] RedHat 7.2 kernel 2.4.7-10 
  
  Neil

-- 
http://www.quill.plus.com