Question about discrepancy of open()'s documentation; BSD vs. SYS V

Andrew Lue andrew at nsc.nsc.com
Wed May 18 10:06:24 AEST 1988


I'm experimenting with file I/O on a BSD system.
According to K&R, the format of the open() function is:

fd = open(name,rwmode);

where rwmode is 0, 1, or 2.

In the BSD documents, the format is

open(path, flags, mode);


With my experiments, I can get the first format to work.  When is
the second format applicable?  When I invoke the C compiler, I don't
pass any flags.
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Andrew H. Lue                                          {decwrl|sun}!nsc!andrew



More information about the Comp.unix.questions mailing list