tech-kern archive

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

Re: fexecve, round 2

On Sun 18 Nov 2012 at 04:40:58 +0100, Emmanuel Dreyfus wrote:
> Thor Lancelot Simon <> wrote:
> > This appears to contradict either the description of O_EXEC in the
> > standard, or the standard's rationale for adding fexecve().  The
> > standard says O_EXEC causes the file to be open for execution "only".
> The definition is really vague. As I understand, nothing forbids opening

Unortunately, it does, in

    Applications shall specify exactly one of the first five values (file 
access modes) below in the value of oflag:

        Open for execute only (non-directory files). The result is unspecified 
if this flag is applied to a directory.
        Open for reading only.
        Open for reading and writing. The result is undefined if this flag is 
applied to a FIFO.
        Open directory for search only. The result is unspecified if this flag 
is applied to a non-directory file.
        Open for writing only. 

(That document specifies waaaaay too many O_* flags, imho. In particular
O_TTY_INIT seems a far too specific use-case to need such a general

___ Olaf 'Rhialto' Seibert  -- There's no point being grown-up if you 
\X/ rhialto/at/    -- can't be childish sometimes. -The 4th Doctor

Home | Main Index | Thread Index | Old Index