emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/w32.c,v


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/src/w32.c,v
Date: Sat, 09 Aug 2008 19:05:03 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Eli Zaretskii <eliz>    08/08/09 19:05:03

Index: w32.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w32.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -b -r1.149 -r1.150
--- w32.c       9 Aug 2008 18:19:28 -0000       1.149
+++ w32.c       9 Aug 2008 19:05:02 -0000       1.150
@@ -3642,6 +3642,7 @@
   Lisp_Object cmd_str, decoded_cmd, tem;
   HANDLE h_snapshot, h_proc;
   DWORD proc_id;
+  int found_proc = 0;
   char uname[UNLEN+1], gname[GNLEN+1], domain[1025];
   DWORD ulength = sizeof (uname), dlength = sizeof (domain), trash;
   DWORD glength = sizeof (gname);
@@ -3701,6 +3702,7 @@
              attrs = Fcons (Fcons (Qthcount,
                                    make_fixnum_or_float (pe.cntThreads)),
                             attrs);
+             found_proc = 1;
              break;
            }
        }
@@ -3708,6 +3710,12 @@
       CloseHandle (h_snapshot);
     }
 
+  if (!found_proc)
+    {
+      UNGCPRO;
+      return Qnil;
+    }
+
   h_proc = OpenProcess (PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,
                        FALSE, proc_id);
   /* If we were denied a handle to the process, try again after




reply via email to

[Prev in Thread] Current Thread [Next in Thread]