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