Cygwin: implement /proc/PID/fd/DESCRIPTOR reopening by handle
Allows expressions along the lines of `cat /proc/self/fd/0 <<EOF'. The problem here is that the temporary file used for the here script has already been deleted by the shell. Opening by filename, as implemented so far, doesn't work because the file has been moved to the bin. Allow reopening files by handle the same way from another process as long as we have sufficient permissions on the foreign process. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@@ -767,6 +767,13 @@ done:
|
||||
return res;
|
||||
}
|
||||
|
||||
fhandler_base *
|
||||
fhandler_base::fd_reopen (int)
|
||||
{
|
||||
/* This is implemented in fhandler_process only. */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
fhandler_base::open_setup (int)
|
||||
{
|
||||
|
Reference in New Issue
Block a user