[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r111276: Avoid leaking handles on
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r111276: Avoid leaking handles on MS-Windows. |
Date: |
Mon, 18 Feb 2013 18:38:50 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111276
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Mon 2013-02-18 18:38:50 +0200
message:
Avoid leaking handles on MS-Windows.
src/w32proc.c (new_child): Avoid leaking handles if the subprocess
resources were not orderly released.
modified:
src/ChangeLog
src/w32proc.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-02-17 18:17:34 +0000
+++ b/src/ChangeLog 2013-02-18 16:38:50 +0000
@@ -1,3 +1,8 @@
+2013-02-18 Eli Zaretskii <address@hidden>
+
+ * w32proc.c (new_child): Avoid leaking handles if the subprocess
+ resources were not orderly released.
+
2013-02-17 Eli Zaretskii <address@hidden>
* w32proc.c (new_child): Remove the loop that attempted to salvage
=== modified file 'src/w32proc.c'
--- a/src/w32proc.c 2013-02-17 18:17:34 +0000
+++ b/src/w32proc.c 2013-02-18 16:38:50 +0000
@@ -802,6 +802,12 @@
cp = &child_procs[child_proc_count++];
Initialize:
+ /* Last opportunity to avoid leaking handles before we forget them
+ for good. */
+ if (cp->procinfo.hProcess)
+ CloseHandle (cp->procinfo.hProcess);
+ if (cp->procinfo.hThread)
+ CloseHandle (cp->procinfo.hThread);
memset (cp, 0, sizeof (*cp));
cp->fd = -1;
cp->pid = -1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r111276: Avoid leaking handles on MS-Windows.,
Eli Zaretskii <=