This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with fstat() after fmemopen()


On Thu, Apr 16, 2009 at 10:26 AM, Alexander Lamaison <awl03@doc.ic.ac.uk> wrote:
> Maybe the documentation should be updated to mention that functions
> requiring file descriptors won't work with the result of fmemopen()?

fopen() states explicitly that it will allocate a descriptor.

fmemopen() does not state that it will allocate a descriptor.

fstat() requires a descriptor.

You want to use posix_typed_mem_open(), but this optional function it
is not yet implemented in glibc.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]