Cygwin: pinfo: add method to send a serialized path_conv and HANDLE

To allow reopening a file open in another process by HANDLE, introduce
a matching file_pathconv method, taking a file descriptor as parameter.
The result is a serialized path_conv and a HANDLE value.  The HANDLE is
valid in the foreign process and MUST be duplicated into the target
process before usage.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2019-01-05 21:57:03 +01:00
parent 91b264c76c
commit c76468182b
2 changed files with 38 additions and 2 deletions

View File

@@ -27,7 +27,8 @@ enum picom
PICOM_FDS = 4,
PICOM_FD = 5,
PICOM_PIPE_FHANDLER = 6,
PICOM_ENVIRON = 7
PICOM_FILE_PATHCONV = 7,
PICOM_ENVIRON = 8
};
#define EXITCODE_SET 0x8000000
@@ -102,6 +103,7 @@ public:
commune_result commune_request (__uint32_t, ...);
bool alive ();
fhandler_pipe *pipe_fhandler (int64_t, size_t &);
void *file_pathconv (int, size_t &);
char *fd (int fd, size_t &);
char *fds (size_t &);
char *root (size_t &);