I'm opening a stream with funopen
FILE *fin = funopen(cookie, readfn, NULL, NULL, closefn);
if (fin == NULL)
{
handle_error();
return -1;
}
int fdin = fileno(fin);
The call to funopen succeeds but `fileno(fin)` returns `-1`.
How can I get the file descriptor? Thanks.
以上就是Why is fileno failing to return a valid descriptor?的详细内容,更多请关注web前端其它相关文章!