From: "Svend-Erik Kjær Madsen" Date: 2004-02-08T19:25:00+09:00 Subject: Re: Threads for dummies ver 0001 Svend-Erik Kj�r Madsen wrote: > Hi > Can somone please tell me howto handle threads in the code below > > def start_app > system("echo #{$passwd}|sudo -S #{$appl}"} > $passwd.value = '' > $appl.value = '' > end > > Works fine, but the system(....) thing, grabs focus ontil the application > stops. > > So far Ive tried to write something like: > > def start_app > Thread.new($passwd, $appl) do > t = Thread.current Got this wrong > passwd = t[:$passwd] > appl = t[:$appl] $passwd = t[:passwd] $appl = t[:appl] > system("echo #{passwd}|sudo -S #{appl}"} > end > $passwd.value = '' > $appl.value = '' > end > > > This dosnt work > > What I want is to create a subprocess running the programm, and return to > reset the variables. -- /Sv-e