[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 09:55:43 EST 2011


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


More information about the win32utils-devel mailing list