X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/8f45ff6cb9a269fc6f8f631908f93b4c8123419c..4aee39a18184ae8595936a03ad254c27d149a0eb:/man/fdflags.3 diff --git a/man/fdflags.3 b/man/fdflags.3 deleted file mode 100644 index 81f3d83..0000000 --- a/man/fdflags.3 +++ /dev/null @@ -1,82 +0,0 @@ -.\" -*-nroff-*- -.de VS -.sp 1 -.RS -.nf -.ft B -.. -.de VE -.ft R -.fi -.RE -.sp 1 -.. -.TH fdflags 3 "23 July 1999" "Straylight/Edgeware" "mLib utilities library" -.SH "NAME" -fdflags \- set file and file descriptor flags -.\" @fdflags -.SH "SYNOPSIS" -.nf -.B "#include " - -.BI "int fdflags(int " fd , -.BI " unsigned " fbic ", unsigned " fxor , -.BI " unsigned " fdbic ", unsigned " fdxor ); -.fi -.SH "DESCRIPTION" -.B fdflags -is a convenience function for setting file and file descriptor flags -using -.BR fcntl (2). -.PP -The file flags are read using -.BR F_GETFL , -the new flags are calculated as -.sp 1 -.RS -.I new-flags -= -.BI ( old-flags -.B & -.BI ~ fbic ) -.B ^ -.I fxor -.RE -.sp 1 -and the result written back using -.BR F_SETFL . -.PP -Similarly the file descriptor flags are read using -.BR F_GETFD , -the new flags calculated as -.sp 1 -.RS -.I new-flags -= -.BI ( old-flags -.B & -.BI ~ fdbic ) -.B ^ -.I fdxor -.RE -.sp 1 -and the result written back using -.BR F_SETFD . -.PP -If all went well, -.B fdflags -returns zero; if there was an error, \-1 is returned. -.SH "EXAMPLES" -To set the non-blocking and close-on-exec flags: -.VS -fdflags(fd, O_NONBLOCK, O_NONBLOCK, FD_CLOEXEC, FD_CLOEXEC); -.VE -To clear the non-blocking and close-on-exec flags: -.VS -fdflags(fd, O_NONBLOCK, 0, FD_CLOEXEC, 0); -.VE -.sp -1 -.SH "SEE ALSO" -.BR mLib (3). -.SH "AUTHOR" -Mark Wooding,