summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2019-01-05 22:16:30 +0100
committerCorinna Vinschen <corinna@vinschen.de>2019-01-06 20:30:14 +0100
commitc90f4c0e27a2d30497eeaab99c76c1906a6bf556 (patch)
treebfbfc2e1b24802de9dd08b96b30ac291cf5a17a1
parent7dbe307e389b916ad4f34ea3c3258049abad2d2c (diff)
downloadcygnal-c90f4c0e27a2d30497eeaab99c76c1906a6bf556.tar.gz
cygnal-c90f4c0e27a2d30497eeaab99c76c1906a6bf556.tar.bz2
cygnal-c90f4c0e27a2d30497eeaab99c76c1906a6bf556.zip
Cygwin: Mark all O_TMPFILEs as deleted
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/cygwin/fhandler.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 4ecbf61ee..1a7513763 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -140,11 +140,8 @@ char *fhandler_base::get_proc_fd_name (char *buf)
IO_STATUS_BLOCK io;
FILE_STANDARD_INFORMATION fsi;
- /* If the file had been opened with O_TMPFILE | O_EXCL, don't
- expose the filename. linkat is supposed to return ENOENT in this
- case. FIXME: As soon as we open by handle from /proc/<PID>/fd,
- the O_EXCL test has to be moved to open. */
- if ((get_flags () & (O_TMPFILE | O_EXCL)) == (O_TMPFILE | O_EXCL)
+ /* If the file had been opened with O_TMPFILE, don't expose the filename. */
+ if ((get_flags () & O_TMPFILE)
|| (get_device () == FH_FS
&& NT_SUCCESS (NtQueryInformationFile (get_handle (), &io,
&fsi, sizeof fsi,