S
Svend-Erik Kjær Madsen
Hi
Can somone please tell me howto handle threads in the code below
<code ex>
def start_app
system("echo #{$passwd}|sudo -S #{$appl}"}
$passwd.value = ''
$appl.value = ''
end
</code ex>
Works fine, but the system(....) thing, grabs focus ontil the application
stops.
So far Ive tried to write something like:
<code ex >
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
</code ex>
This dosnt work
What I want is to create a subprocess running the programm, and return to
reset the variables.
Can somone please tell me howto handle threads in the code below
<code ex>
def start_app
system("echo #{$passwd}|sudo -S #{$appl}"}
$passwd.value = ''
$appl.value = ''
end
</code ex>
Works fine, but the system(....) thing, grabs focus ontil the application
stops.
So far Ive tried to write something like:
<code ex >
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
</code ex>
This dosnt work
What I want is to create a subprocess running the programm, and return to
reset the variables.