Bug 46133 - ProcessLauncherWin.cpp leaks the child process handle
Summary: ProcessLauncherWin.cpp leaks the child process handle
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Adam Roben (:aroben)
Keywords: InRadar, PlatformOnly
Depends on:
Reported: 2010-09-20 16:30 PDT by Anders Carlsson
Modified: 2010-09-27 08:23 PDT (History)
1 user (show)

See Also:

Stop leaking the web process's process handle on Windows (4.22 KB, patch)
2010-09-27 07:01 PDT, Adam Roben (:aroben)
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2010-09-20 16:30:00 PDT
We should ::CloseHandle the handle.
Comment 1 Adam Roben (:aroben) 2010-09-20 16:31:31 PDT
According to MSDN:

If the function succeeds, be sure to call the CloseHandle function to close the hProcess and hThread handles when you are finished with them. Otherwise, when the child process exits, the system cannot clean up the process structures for the child process because the parent process still has open handles to the child process. However, the system will close these handles when the parent process terminates, so the structures related to the child process object would be cleaned up at this point.

Comment 2 Adam Roben (:aroben) 2010-09-20 16:32:05 PDT
Comment 3 Adam Roben (:aroben) 2010-09-27 07:01:14 PDT
Created attachment 68905 [details]
Stop leaking the web process's process handle on Windows
Comment 4 Adam Roben (:aroben) 2010-09-27 08:23:45 PDT
Committed r68391: <http://trac.webkit.org/changeset/68391>