[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] freopen SEGFAULT on win32 with filename == NULL

From: Bruno Haible
Subject: Re: [PATCH] freopen SEGFAULT on win32 with filename == NULL
Date: Wed, 31 Aug 2011 23:44:25 +0200
User-agent: KMail/1.13.6 (Linux/; KDE/4.6.0; x86_64; ; )

Bastien ROUCARIES wrote:
> >> - hpux has pstat
> >
> > More details, please? pstat_getfiledetails does not return a file name.
> See pstat_getpathname()

I can't find a definition of pst_fid anywhere. Also, this function only
accesses a cache; it may fail. Also, what if fd is a pipe or socket?

> > And without a working emulation on OpenBSD, it still makes no sense to use
> > this API, IMO. At some point, OpenBSD had /dev/fd/ apparently [1].
> According to documentation it has one
> http://nixdoc.net/man-pages/openbsd/man8/mount_fdesc.8.html
> It is even mentionned in porting documentation see
> http://www.openbsd.org/porting.html

Indeed, OpenBSD really has /dev/fd.

Still, when looking at AIX 5.1, HP-UX 11.23, mingw, and possibly other
platforms: It is easier to write portable programs by *avoiding*
freopen(NULL,...) than by going through all the hoops that would be
needed to implement it everywhere.

In memoriam Magomed Yevloyev <http://en.wikipedia.org/wiki/Magomed_Yevloyev>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]