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

Re: open()



On Tue, 12 May 1998, Petr Stehlik wrote:

> BTW, is it usual to #include both <fcntl.h> and <unistd.h> just to get
> open() and close()? I don't have linux headers by hand, but I would
> guess that either open() should be in unistd.h or read() and write() in
> fcntl.h. What you think?


I think POSIX defines that open() is from fcntl.h and read/write are from
unistd.h. I don't think this is necessarily terribly logical, but that's
how things are..
(if one nasty thing has to be said about UNIX, things aren't always
terribly logical).

         -     ---------- = = ---------//--+
         |    /     Kristoffer Lawson      |    www.fishpool.com
         +-> |    setok@fishpool.com       |  - - --+
             |-- Fishpool Creations Ltd - /         |
             +-------- = - - - = ---------      /~setok/