From: "Svend-Erik Kjær Madsen" Date: 2004-02-09T09:43:47+09:00 Subject: Threads for dummies 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 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