diff options
author | Christopher Faylor <me@cgf.cx> | 2000-10-31 17:01:56 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-10-31 17:01:56 +0000 |
commit | dd07a42567d385dcb9837830f38295308f6500fc (patch) | |
tree | 17d1ffcb7f492e4ccc423076b2202baad337ed75 | |
parent | 99119403f3d75aac653ff640415873f818e5188f (diff) | |
download | cygnal-dd07a42567d385dcb9837830f38295308f6500fc.tar.gz cygnal-dd07a42567d385dcb9837830f38295308f6500fc.tar.bz2 cygnal-dd07a42567d385dcb9837830f38295308f6500fc.zip |
* pinfo.cc (enum_init): Don't suffer silently if we can't load the process
enumerators.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/pinfo.cc | 15 |
2 files changed, 17 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 0d8c0cda8..cb2bc04fd 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 31 12:00:06 2000 Christopher Faylor <cgf@cygnus.com> + + * pinfo.cc (enum_init): Don't suffer silently if we can't load the + process enumerators. + Mon Oct 30 16:54:26 2000 Christopher Faylor <cgf@cygnus.com> * signal.cc (kill_pgrp): Revert 25-Oct change. diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index f50982833..3b5f002e4 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -337,10 +337,16 @@ enum_init (DWORD *lpidProcess, DWORD cb, DWORD *cbneeded) { h = LoadLibrary ("psapi.dll"); if (!h) - return 0; + { + system_printf ("couldn't load psapi.dll, %E"); + return 0; + } myEnumProcesses = (ENUMPROCESSES) GetProcAddress (h, "EnumProcesses"); if (!myEnumProcesses) - return 0; + { + system_printf ("couldn't locate EnumProcesses in psapi.dll, %E"); + return 0; + } } else { @@ -352,7 +358,10 @@ enum_init (DWORD *lpidProcess, DWORD cb, DWORD *cbneeded) myProcess32Next = (PROCESSWALK) GetProcAddress(h, "Process32Next"); if (!myCreateToolhelp32Snapshot || !myProcess32First || !myProcess32Next) - return 0; + { + system_printf ("Couldn't find toolhelp processes, %E"); + return 0; + } myEnumProcesses = EnumProcessesW95; } |