Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fstat(2) — DG/UX R4.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(2)

chown(2)

creat(2)

fchmod(2)

fchown(2)

link(2)

lstat(2)

mknod(2)

pipe(2)

read(2)

stat(2)

time(2)

unlink(2)

utime(2)

utimes(2)

write(2)



fstat(2)                          SDK R4.11                         fstat(2)


NAME
       fstat - get file status

SYNOPSIS
       #include <sys/types.h>
       #include <sys/stat.h>

       int    fstat (fildes, bufferptr)
       int    fildes;
       struct stat * bufferptr;

   where:
       fildes         A valid, active file descriptor
       bufferptr     Address of a stat buffer to fill

DESCRIPTION
       Fstat returns the current attributes of the file referenced by fildes
       into the status buffer at the location specified by bufferptr.

       The subject file must be of type `ordinary-disk-file', `directory',
       `block-special-file', `character-special-file', `fifo-special-file'
       `pipe', or `socket'.

       See stat(2) for more details about the information returned in the
       stat structure.

       If fstat fails, the contents of the stat buffer are undefined.

ACCESS CONTROL
       Read, write, or execute permission of the file is not required.
       However, for fildes to be active, the file must be open for reading
       or writing.

RETURN VALUE
       0      The fstat operation was successful.

       -1     An error occurred.  errno is set to indicate the error.

DIAGNOSTICS
       Errno may be set to one of the following error codes:

       EBADF     fildes is not a valid, active file descriptor.

       EFAULT    bufferpointer points to an invalid address.

SEE ALSO
       chmod(2), chown(2), creat(2), dgmstat(2), fchmod(2), fchown(2),
       link(2), lstat(2), mknod(2), pipe(2), read(2), stat(2), time(2),
       unlink(2), utime(2), utimes(2), write(2).


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026