On 3/3/2024 10:16 PM, Cedric Blancher via Cygwin wrote:

How can I convert a file descriptor from Cygwin openat() to Win32 file HANDLE?

In general, this can be done with:
    hFile = (HANDLE) _get_osfhandle (int fd);

That works for simple cases such as disk file descriptors. I've learned one can't always depend on it because Cygwin can use several handles for a specific file or other object in certain situations, which I'm not going to list here because I don't know them all.

Try that and see if it works for your case.

..mark

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to