bug-gnulib
[Top][All Lists]
Advanced

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

Re: closed file descriptors on HP-UX


From: Bruno Haible
Subject: Re: closed file descriptors on HP-UX
Date: Thu, 03 Jan 2019 20:57:54 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; )

Paul Eggert asks:
> > On HP-UX 11.31, however, the exec() call transforms a closed file
> > descriptor to a file descriptor that behaves identically to /dev/null,
> > regarding fstat and fcntl.
> 
> Does this happen for all file decriptors, or only for file descriptors 0, 1, 
> and 
> 2?

Only for 0, 1, 2.

> If the latter, then HP-UX mostly conforms to POSIX except for its weird 
> behavior on 'read', as the POSIX spec for execlp says that if one of these 
> file 
> descriptors are closed, the execed process may see them open on an 
> unspecified file.

Oh well. Then it's even POSIX compliant. But HP-UX (and possibly Windows)
is the only platform where things are really like this - otherwise we would have
seen more platforms where the diffutils 'new-file' test fails.

Bruno




reply via email to

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