[Win32utils-devel] [ win32utils-Bugs-28840 ] wrong process_id is returned if using create multiple times for IE

noreply at rubyforge.org noreply at rubyforge.org
Sun Jan 9 10:51:30 EST 2011


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


More information about the win32utils-devel mailing list