Just to provide a citation for @tekknolagi's comment,
man fmemopen
says "There is no file descriptor associated with the file stream returned by this function (i.e., fileno(3) will return an error if called on the returned stream)." It doesn't say why it doesn't work, though. I'm a bit bummed it doesn't. —
Faheem Mitha 18 secs ago