diff options
Diffstat (limited to 'winsup/cygwin/fhandler_process.cc')
-rw-r--r-- | winsup/cygwin/fhandler_process.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index cb0b80520..28fd28c39 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -451,19 +451,18 @@ fhandler_process::fill_filebuf () else { mount_table->conv_to_posix_path (p->progname, filebuf, 1); -#if 0 - /* Temporarily disabled. The link will have a suffix so that - an open(2) call will succeed on /proc/$PID/exe now. This - might become unnecessary if open(2) handles the .exe suffix - at one point. */ - int len = strlen (filebuf); - if (len > 4) + /* If transparent_exe isn't set, the link keeps its suffix so that + an open(2) call will succeed on /proc/$PID/exe. */ + if (transparent_exe) { - char *s = filebuf + len - 4; - if (strcasematch (s, ".exe")) - *s = 0; + int len = strlen (filebuf); + if (len > 4) + { + char *s = filebuf + len - 4; + if (strcasematch (s, ".exe")) + *s = 0; + } } -#endif } filesize = strlen (filebuf); break; |