# New Ticket Created by Jonathan Stowe # Please include the string: [perl #126541] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=126541 >
Hi, In a number of places in the design documents it is suggested that certain functionality on files (e.g. fcntl, ioctl) or sockets (e.g. getsockname, setsockopt) should be provided by external modules via the NativeCall interface, however the majority of these C library functions require the native "file descriptor" as one of the arguments. It would be useful to module authors if the OS platform (or runtime environment) idea of a "file descriptor" was available through some accessor on the IO::Handle, IO::Socket etc Where libuv is being used then this is available through int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd) If libuv is being bypassed for sync operations at some later point then the descriptor will be available directly. My personal fear is that if this is not provided for the use in modules that require them then people will just bypass IO::* altogether creating an interoperability nightmare. Thanks.