Daniel Berger
2012-Jun-12 19:05 UTC
[Win32utils-devel] Problem with Process.spawn + Process.kill
Hi, This little bit of code is causing me trouble. Ruby 1.9.3-p194 on Windows 7, btw. # kill_test.rb cmd = "ruby -e ''sleep 5; at_exit{ puts \"cmd finished\" }" pid = Process.spawn(cmd) Process.kill(''INT'', pid) puts "Done" This results in popup dialogue that says, "The application was unable to start correctly. Click OK to close the application." Any ideas? Dan
Heesob Park
2012-Jun-13 01:04 UTC
[Win32utils-devel] Problem with Process.spawn + Process.kill
Hi, 2012/6/13 Daniel Berger <djberg96 at gmail.com>> Hi, > > This little bit of code is causing me trouble. Ruby 1.9.3-p194 on > Windows 7, btw. > > # kill_test.rb > cmd = "ruby -e ''sleep 5; at_exit{ puts \"cmd finished\" }" > > pid = Process.spawn(cmd) > > Process.kill(''INT'', pid) > > puts "Done" > > This results in popup dialogue that says, "The application was unable > to start correctly. Click OK to close the application." > > Any ideas? > > Did you see the popup dialogue after Process.kill?I guess this issue is similer to http://bugs.ruby-lang.org/issues/6535 . If so, it is fixed on the trunk. Regards, Park Heesob -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/win32utils-devel/attachments/20120613/319f3573/attachment.html>
Daniel Berger
2012-Jun-13 13:24 UTC
[Win32utils-devel] Problem with Process.spawn + Process.kill
On Tue, Jun 12, 2012 at 7:04 PM, Heesob Park <phasis at gmail.com> wrote:> Hi, > > 2012/6/13 Daniel Berger <djberg96 at gmail.com> >> >> Hi, >> >> This little bit of code is causing me trouble. Ruby 1.9.3-p194 on >> Windows 7, btw. >> >> # kill_test.rb >> cmd = "ruby -e ''sleep 5; at_exit{ puts \"cmd finished\" }" >> >> pid = Process.spawn(cmd) >> >> Process.kill(''INT'', pid) >> >> puts "Done" >> >> This results in popup dialogue that says, "The application was unable >> to start correctly. Click OK to close the application." >> >> Any ideas? >> > Did you see the popup dialogue after Process.kill? > I guess this issue is similer to?http://bugs.ruby-lang.org/issues/6535?. > If so, it is fixed on the trunk.Yes, that''s it. Thanks! Dan