diff options
author | Christopher Faylor <me@cgf.cx> | 2013-03-29 16:19:11 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2013-03-29 16:19:11 +0000 |
commit | bb93b7ab95e10ffdf17eeb6e0e055956b92603c3 (patch) | |
tree | 99a13c393bc31360198116a975dc05a7898b16bf /winsup/cygwin/pinfo.cc | |
parent | 6fcb2238583e71dc3a4fb88eec43de85c5c074eb (diff) | |
download | cygnal-bb93b7ab95e10ffdf17eeb6e0e055956b92603c3.tar.gz cygnal-bb93b7ab95e10ffdf17eeb6e0e055956b92603c3.tar.bz2 cygnal-bb93b7ab95e10ffdf17eeb6e0e055956b92603c3.zip |
* pinfo.h (pinfo::status_exit): Rename from former static function in pinfo.cc.
(pinfo::operator == (char *)): Remove unused operator.
* pinfo.cc (pinfo::status_exit): Move this function info pinfo class. Use
progname from the pinfo rather than myself. Be defensive when inspecting
procinfo.
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r-- | winsup/cygwin/pinfo.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 5800590cb..79eb25e01 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -110,17 +110,23 @@ pinfo_init (char **envp, int envc) debug_printf ("pid %d, pgid %d", myself->pid, myself->pgid); } -static DWORD -status_exit (DWORD x) +DWORD +pinfo::status_exit (DWORD x) { switch (x) { case STATUS_DLL_NOT_FOUND: { char posix_prog[NT_MAX_PATH]; - UNICODE_STRING uc; - RtlInitUnicodeString(&uc, myself->progname); - path_conv pc (&uc, PC_NOWARN); + path_conv pc; + if (!procinfo) + pc.check ("/dev/null"); + else + { + UNICODE_STRING uc; + RtlInitUnicodeString(&uc, procinfo->progname); + pc.check (&uc, PC_NOWARN); + } mount_table->conv_to_posix_path (pc.get_win32 (), posix_prog, 1); small_printf ("%s: error while loading shared libraries: %s: cannot open shared object file: No such file or directory\n", posix_prog, find_first_notloaded_dll (pc)); |