Re: [vox-tech] file stuff
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vox-tech] file stuff
- Subject: Re: [vox-tech] file stuff
- From: Micah Cowan <micah@coMAPSwanbox.com>
- Date: Fri, 17 Nov 2000 15:47:30 -0800
- References: Pine.LNX.4.21.0011171528350.5202-100000@belial.ucdavis.edu
On Fri, Nov 17, 2000 at 03:30:46PM -0800, Peter Jay Salzman wrote:
> i'm reading a book on files under unix, and it isn't clear on a point -
>
> what is the difference between file descriptor flags (in the process table
> entry) and file status flags (in the file table)?
I think you might be confusing the two...
>From the texinfo docs:
"Currently there is just one file descriptor flag: `FD_CLOEXEC'"
>
> they look the same to me -- the flags you specify with open(). right?
>
> pete
Check out the libc texinfo docs.
$ info libc
It's under Low-Level I/O.
More from docs:
<<
"File status flags" are used to specify attributes of the opening of
a file. Unlike the file descriptor flags discussed in *Note Descriptor
Flags::, the file status flags are shared by duplicated file descriptors
resulting from a single opening of the file. The file status flags are
specified with the FLAGS argument to `open'; *note Opening and Closing
Files::.
File status flags fall into three categories, which are described in
the following sections.
* Access Modes::, specify what type of access is allowed to the
file: reading, writing, or both. They are set by `open' and are
returned by `fcntl', but cannot be changed.
* Open-time Flags::, control details of what `open' will do.
These flags are not preserved after the `open' call.
* Operating Modes::, affect how operations such as `read' and
`write' are done. They are set by `open', and can be fetched or
changed with `fcntl'.
The symbols in this section are defined in the header file `fcntl.h'.
>>
hope that helps!
Micah
|