Cygwin: introduce fhandler_process_fd and add stat(2) handling
move special fd symlink code into own fhandler_process_fd class to simplify further additions to /proc/PID/fd/DESCRIPTOR symlink handling. Add a method to handle stat(2) on such a proc fd symlink by handle. This allows correct reply from stat(2) if the target file has been deleted. This eventually fixes `awk -f /dev/fd/3 3<<eof'. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@@ -2005,7 +2005,8 @@ extern "C" int
|
||||
stat64 (const char *__restrict name, struct stat *__restrict buf)
|
||||
{
|
||||
syscall_printf ("entering");
|
||||
path_conv pc (name, PC_SYM_FOLLOW | PC_POSIX | PC_KEEP_HANDLE,
|
||||
path_conv pc (name, PC_SYM_FOLLOW | PC_POSIX | PC_KEEP_HANDLE
|
||||
| PC_SYM_NOFOLLOW_PROCFD,
|
||||
stat_suffixes);
|
||||
return stat_worker (pc, buf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user