getufdflags and setufdflags Kernel Services

Purpose

Queries and sets file-descriptor flags.

Syntax

#include <sys/user.h> int getufdflags(fd, flagsp) int fd; int *flagsp; #include <sys/user.h> int setufdflags(fd, flags) int fd; int flags;

Parameters

Item Description
fd Identifies the file descriptor.
flags Sets attribute flags for the specified file descriptor. Refer to the sys/user.h file for the list of valid flags.
flagsp Points to an integer field where the flags associated with the file descriptor are stored on successful return.

Description

The setufdflags and getufdflags kernel services set and query the file descriptor flags. The file descriptor flags are listed in fontl.h.

Execution Environment

These kernel services can be called from the process environment only.

Return Values

Item Description
0 Indicates successful completion.
EBADF Indicates that the fd parameter is not a file descriptor for an open file.