noreply at rubyforge.org
2011-Jan-09 14:55 UTC
[Win32utils-devel] [ win32utils-Bugs-28840 ] wrong process_id is returned if using create multiple times for IE
Bugs item #28840, was opened at 2011-01-09 16:55 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28840&group_id=85 Category: win32-process Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jarmo Pertman (juuser) Assigned to: Nobody (None) Summary: wrong process_id is returned if using create multiple times for IE Initial Comment: Hi. Execute in IRB: require "win32/process" proc1 = Process.create(:app_name => "C:\Program Files (x86)\Internet Explorer\iexplore.exe about:blank") Process.kill 9, proc1.process_id # works proc1 = Process.create(:app_name => "C:\Program Files (x86)\Internet Explorer\iexplore.exe about:blank") proc2 = Process.create(:app_name => "C:\Program Files (x86)\Internet Explorer\iexplore.exe about:blank") Process.kill 9, proc2.process_id # doesn''t work because the proc2.process_id doesn''t exist anymore Any ideas why the proc2 process_id will not exist right after starting it? It is possible to see that it exists for a brief time with Process Explorer, but will be gone. How to get the "correct" PID? ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28840&group_id=85
noreply at rubyforge.org
2011-Jan-09 15:51 UTC
[Win32utils-devel] [ win32utils-Bugs-28840 ] wrong process_id is returned if using create multiple times for IE
Bugs item #28840, was opened at 2011-01-09 07:55 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28840&group_id=85 Category: win32-process Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jarmo Pertman (juuser) Assigned to: Nobody (None) Summary: wrong process_id is returned if using create multiple times for IE Initial Comment: Hi. Execute in IRB: require "win32/process" proc1 = Process.create(:app_name => "C:\Program Files (x86)\Internet Explorer\iexplore.exe about:blank") Process.kill 9, proc1.process_id # works proc1 = Process.create(:app_name => "C:\Program Files (x86)\Internet Explorer\iexplore.exe about:blank") proc2 = Process.create(:app_name => "C:\Program Files (x86)\Internet Explorer\iexplore.exe about:blank") Process.kill 9, proc2.process_id # doesn''t work because the proc2.process_id doesn''t exist anymore Any ideas why the proc2 process_id will not exist right after starting it? It is possible to see that it exists for a brief time with Process Explorer, but will be gone. How to get the "correct" PID? ---------------------------------------------------------------------->Comment By: Daniel Berger (djberg96)Date: 2011-01-09 08:51 Message: Which version of IE and Windows? Do you see the same behavior with other applications, such as notepad? Some applications on Windows automatically relaunch themselves as remote threads of an already existing process. I''ve seen this in the past with Firefox, for example. One way to test this is to launch the process explorer, then launch multiple instances of IE. If you still only see one IE process, then that''s what''s happening. Regards, Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28840&group_id=85
noreply at rubyforge.org
2011-Jan-09 16:41 UTC
[Win32utils-devel] [ win32utils-Bugs-28840 ] wrong process_id is returned if using create multiple times for IE
Bugs item #28840, was opened at 2011-01-09 16:55 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28840&group_id=85 Category: win32-process Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jarmo Pertman (juuser) Assigned to: Nobody (None) Summary: wrong process_id is returned if using create multiple times for IE Initial Comment: Hi. Execute in IRB: require "win32/process" proc1 = Process.create(:app_name => "C:\Program Files (x86)\Internet Explorer\iexplore.exe about:blank") Process.kill 9, proc1.process_id # works proc1 = Process.create(:app_name => "C:\Program Files (x86)\Internet Explorer\iexplore.exe about:blank") proc2 = Process.create(:app_name => "C:\Program Files (x86)\Internet Explorer\iexplore.exe about:blank") Process.kill 9, proc2.process_id # doesn''t work because the proc2.process_id doesn''t exist anymore Any ideas why the proc2 process_id will not exist right after starting it? It is possible to see that it exists for a brief time with Process Explorer, but will be gone. How to get the "correct" PID? ---------------------------------------------------------------------->Comment By: Jarmo Pertman (juuser)Date: 2011-01-09 18:41 Message: The problem is reproducable on windows 7 64bit and windows xp 32bit with IE8. It seems to happen "only" with IE and when using process explorer then i can see that the process with "correct id" is killed quite right after started. Although there won''t be only one iexplore.exe left, but the count of processes will increase after each Process.create. Under win7 i will have 3 iexplore.exe''s running when using Process.create 2 times. Under xp 2. ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2011-01-09 17:51 Message: Which version of IE and Windows? Do you see the same behavior with other applications, such as notepad? Some applications on Windows automatically relaunch themselves as remote threads of an already existing process. I''ve seen this in the past with Firefox, for example. One way to test this is to launch the process explorer, then launch multiple instances of IE. If you still only see one IE process, then that''s what''s happening. Regards, Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28840&group_id=85
noreply at rubyforge.org
2011-Jan-09 16:49 UTC
[Win32utils-devel] [ win32utils-Bugs-28840 ] wrong process_id is returned if using create multiple times for IE
Bugs item #28840, was opened at 2011-01-09 07:55 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28840&group_id=85 Category: win32-process Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jarmo Pertman (juuser) Assigned to: Nobody (None) Summary: wrong process_id is returned if using create multiple times for IE Initial Comment: Hi. Execute in IRB: require "win32/process" proc1 = Process.create(:app_name => "C:\Program Files (x86)\Internet Explorer\iexplore.exe about:blank") Process.kill 9, proc1.process_id # works proc1 = Process.create(:app_name => "C:\Program Files (x86)\Internet Explorer\iexplore.exe about:blank") proc2 = Process.create(:app_name => "C:\Program Files (x86)\Internet Explorer\iexplore.exe about:blank") Process.kill 9, proc2.process_id # doesn''t work because the proc2.process_id doesn''t exist anymore Any ideas why the proc2 process_id will not exist right after starting it? It is possible to see that it exists for a brief time with Process Explorer, but will be gone. How to get the "correct" PID? ---------------------------------------------------------------------->Comment By: Daniel Berger (djberg96)Date: 2011-01-09 09:49 Message: Please try creating 3 processes using your code above, but comment out the parts that kills them. Then fire up Process explorer and see if they''re there. Regards, Dan ---------------------------------------------------------------------- Comment By: Jarmo Pertman (juuser) Date: 2011-01-09 09:41 Message: The problem is reproducable on windows 7 64bit and windows xp 32bit with IE8. It seems to happen "only" with IE and when using process explorer then i can see that the process with "correct id" is killed quite right after started. Although there won''t be only one iexplore.exe left, but the count of processes will increase after each Process.create. Under win7 i will have 3 iexplore.exe''s running when using Process.create 2 times. Under xp 2. ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2011-01-09 08:51 Message: Which version of IE and Windows? Do you see the same behavior with other applications, such as notepad? Some applications on Windows automatically relaunch themselves as remote threads of an already existing process. I''ve seen this in the past with Firefox, for example. One way to test this is to launch the process explorer, then launch multiple instances of IE. If you still only see one IE process, then that''s what''s happening. Regards, Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28840&group_id=85
noreply at rubyforge.org
2011-Jan-09 17:20 UTC
[Win32utils-devel] [ win32utils-Bugs-28840 ] wrong process_id is returned if using create multiple times for IE
Bugs item #28840, was opened at 2011-01-09 16:55 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28840&group_id=85 Category: win32-process Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jarmo Pertman (juuser) Assigned to: Nobody (None) Summary: wrong process_id is returned if using create multiple times for IE Initial Comment: Hi. Execute in IRB: require "win32/process" proc1 = Process.create(:app_name => "C:\Program Files (x86)\Internet Explorer\iexplore.exe about:blank") Process.kill 9, proc1.process_id # works proc1 = Process.create(:app_name => "C:\Program Files (x86)\Internet Explorer\iexplore.exe about:blank") proc2 = Process.create(:app_name => "C:\Program Files (x86)\Internet Explorer\iexplore.exe about:blank") Process.kill 9, proc2.process_id # doesn''t work because the proc2.process_id doesn''t exist anymore Any ideas why the proc2 process_id will not exist right after starting it? It is possible to see that it exists for a brief time with Process Explorer, but will be gone. How to get the "correct" PID? ---------------------------------------------------------------------->Comment By: Jarmo Pertman (juuser)Date: 2011-01-09 19:20 Message: On win7 i have 4 processes after running Process.create 3 times and only first one has the pid reported by Process.create for the first time. It seems indeed that there is somekind of an "optimization" going on. ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2011-01-09 18:49 Message: Please try creating 3 processes using your code above, but comment out the parts that kills them. Then fire up Process explorer and see if they''re there. Regards, Dan ---------------------------------------------------------------------- Comment By: Jarmo Pertman (juuser) Date: 2011-01-09 18:41 Message: The problem is reproducable on windows 7 64bit and windows xp 32bit with IE8. It seems to happen "only" with IE and when using process explorer then i can see that the process with "correct id" is killed quite right after started. Although there won''t be only one iexplore.exe left, but the count of processes will increase after each Process.create. Under win7 i will have 3 iexplore.exe''s running when using Process.create 2 times. Under xp 2. ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2011-01-09 17:51 Message: Which version of IE and Windows? Do you see the same behavior with other applications, such as notepad? Some applications on Windows automatically relaunch themselves as remote threads of an already existing process. I''ve seen this in the past with Firefox, for example. One way to test this is to launch the process explorer, then launch multiple instances of IE. If you still only see one IE process, then that''s what''s happening. Regards, Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=28840&group_id=85