From: Daniel Berger Date: 2005-09-20T09:31:37+09:00 Subject: Re: Handling multiple processes on Windows Ara.T.Howard wrote: > On Tue, 20 Sep 2005, Joel VanderWerf wrote: > > > Gregory Brown wrote: > > > >> So my question is, how exactly would you go about writing a program > >> that could fire a process to a command line application, let it run, > >> give control back to your main program, and kill the process if an > >> event occurs (Like the pressing of a 'stop' button or even command line > >> interaction). > >> > >> I thought about threading but since the threads are done in process I'm > >> afraid of explosions and complications galore. > > > > Use a ruby thread to manage the external process. There are some libs > > for this (session is one, I think it will give you better access to > > in/out/err streams). But ruby itself has some basic support: > > > > cmd_th = Thread.new do > > system "something" > > end > > > > if user_presses_stop > > cmd_th.kill > > end > > session could be ported to windows using the win32-popen3 call. volunteers? > > -a I think you just did. I'll setup your account. ;) Dan