M
Michael Linfield
i want to have a program restart when its closed via the X button on the
window / terminal
any ideas?
window / terminal
any ideas?
You're going into very platform specific territory there. Potentiallyi want to have a program restart when its closed via the X button
on the
window / terminal
any ideas?
Michael said:i want to have a program restart when its closed via the X button on the
window / terminal
any ideas?
i want to have a program restart when its closed via the X button on the
window / terminal
any ideas?
John said:You're going into very platform specific territory there. Potentially
malware like behavior.
thanks Tim Pease ill look into thatat_exit {exec "ruby", $0, *ARGS}
END{
code
}
this is true, i do see how it could be seen as malware behavior and i
should probably stay away from that. Its purpose is to make sure the
user cannot exit while its running its given functions, if they were to
do this, it could cause some serious problems
thanks Tim Pease ill look into that
i will give that a shot as well
Here's another mechanism:
loop do
Process.waitpid( fork do
# your program goes here
end )
end
2007/9/18 said:Windows is the fork nazi ... "No fork for you!"
03.times do |i|
Process.waitpid( fork { sleep 1; puts i } )
end
XXX
But clever, nonetheless.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.