Hello
I need to get the file descriptor, which is encapsulated inside a handle.
handleToFd gets it, but the fd is closed. Is it possible to extract the fd
from the handle, without modifying the handle?
Greetings,
Volker
___
Glasgow-haskell-users mail
Hello
I need to get the file descriptor, which is encapsulated inside a handle.
handleToFd gets it, but the fd is closed. Is it possible to extract the fd
from the handle, without modifying the handle?
Greetings,
Volker
___
Glasgow-haskell-users mail
On 27/01/2011 20:04, Volker Wysk wrote:
I need to get the file descriptor, which is encapsulated inside a handle.
handleToFd gets it, but the fd is closed. Is it possible to extract the fd
from the handle, without modifying the handle?
I think you mean the *Handle* is closed, not the FD, right?
At line 206 of this file there is a withFd function that might suit your needs,
https://patch-tag.com/r/mae/sendfile/snapshot/current/content/pretty/src/Network/Socket/SendFile/Internal.hs
-- The Fd should not be used after the action returns because the
-- Handler may be garbage collected and th