From: Gavin Kistner Date: 2005-05-24T21:35:15+09:00 Subject: Re: Killing a Process started with Kernel.system On May 23, 2005, at 11:40 PM, Martin aus Chemnitz wrote: > Under Windows, I want to start an external program and kill it on > exitting my Ruby script. > > begin > $t = Thread.new { system("everlasting") } > ... > ensure > $t.kill > end > > does not stop the everlasting program, it stops $t, not its child > processes. Such a command is urgently needed! Here's a way to kill any process using Win32OLE: require 'win32ole' class WIN32OLE def to_a a = []; self.each{ |p| a<