#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int open(const char *pathname, int flags);
int open(const char *pathname, int flags, mode_t mode);
int creat(const char *pathname, mode_t mode);
int open(const char *pathname, int flags);
int open(const char *pathname, int flags, mode_t mode);
int creat(const char *pathname, mode_t mode);-ord:
A semantically similar (but deprecated) interface for block devices
is described in
raw(8).
The argument
mode specifies the permissions to use in case a new file is created. It is
modified by the processs
umask in the usual way: the permissions of the created file are
(mode & ~umask). Note that this mode only applies to future accesses of the
newly created file; the
open() call that creates a read-only file may well return a read/write
file descriptor.
creat() is equivalent to
open() with
flags equal to
O_CREAT|O_WRONLY|O_TRUNC...
close (2)
dup (2)
fcntl (2)
link (2)
lseek (2)
mknod (2)
mount (2)
mmap (2)
openat (2)
path_resolution (2)
read (2)
socket (2)
stat (2)
umask (2)
unlink (2)
write (2)
Advertisements