From 5bd8884c66002f4da091ba3fdf9309e79aae1d86 Mon Sep 17 00:00:00 2001 From: keramida Date: Mon, 15 Jul 2002 20:59:12 +0000 Subject: The .Fn function. --- lib/libc/sys/chdir.2 | 8 ++++++-- lib/libc/sys/chflags.2 | 10 ++++++---- lib/libc/sys/chmod.2 | 9 ++++++--- lib/libc/sys/chown.2 | 21 ++++++++++++++------- lib/libc/sys/chroot.2 | 9 ++++++--- lib/libc/sys/close.2 | 5 +++-- lib/libc/sys/dup.2 | 9 ++++++--- lib/libc/sys/execve.2 | 8 ++++++-- lib/libc/sys/fcntl.2 | 10 ++++++---- lib/libc/sys/flock.2 | 5 +++-- lib/libc/sys/fork.2 | 10 ++++++---- 11 files changed, 68 insertions(+), 36 deletions(-) (limited to 'lib') diff --git a/lib/libc/sys/chdir.2 b/lib/libc/sys/chdir.2 index 13da8b3..bb7a0c8 100644 --- a/lib/libc/sys/chdir.2 +++ b/lib/libc/sys/chdir.2 @@ -75,7 +75,9 @@ a process must have execute (search) access to the directory. .Sh RETURN VALUES .Rv -std .Sh ERRORS -.Fn Chdir +The +.Fn chdir +function will fail and the current working directory will be unchanged if one or more of the following are true: .Bl -tag -width Er @@ -98,7 +100,9 @@ points outside the process's allocated address space. An I/O error occurred while reading from or writing to the file system. .El .Pp -.Fn Fchdir +The +.Fn fchdir +function will fail and the current working directory will be unchanged if one or more of the following are true: .Bl -tag -width Er diff --git a/lib/libc/sys/chflags.2 b/lib/libc/sys/chflags.2 index 1ec73c1..00dd0f8 100644 --- a/lib/libc/sys/chflags.2 +++ b/lib/libc/sys/chflags.2 @@ -121,8 +121,9 @@ for details.) .Sh RETURN VALUES .Rv -std .Sh ERRORS -.Fn Chflags -will fail if: +The +.Fn chflags +function will fail if: .Bl -tag -width Er .It Bq Er ENOTDIR A component of the path prefix is not a directory. @@ -151,8 +152,9 @@ error occurred while reading from or writing to the file system. The underlying file system does not support file flags. .El .Pp -.Fn Fchflags -will fail if: +The +.Fn fchflags +function will fail if: .Bl -tag -width Er .It Bq Er EBADF The descriptor is not valid. diff --git a/lib/libc/sys/chmod.2 b/lib/libc/sys/chmod.2 index 5b6990a..f0be152 100644 --- a/lib/libc/sys/chmod.2 +++ b/lib/libc/sys/chmod.2 @@ -159,7 +159,9 @@ at the expense of a degree of compatibility. .Sh RETURN VALUES .Rv -std .Sh ERRORS -.Fn Chmod +The +.Fn chmod +function will fail and the file mode will be unchanged if: .Bl -tag -width Er .It Bq Er ENOTDIR @@ -187,8 +189,9 @@ An I/O error occurred while reading from or writing to the file system. An attempt was made to set the sticky bit upon an executable. .El .Pp -.Fn Fchmod -will fail if: +The +.Fn fchmod +function will fail if: .Bl -tag -width Er .It Bq Er EBADF The descriptor is not valid. diff --git a/lib/libc/sys/chown.2 b/lib/libc/sys/chown.2 index dc1d067..7ea3449 100644 --- a/lib/libc/sys/chown.2 +++ b/lib/libc/sys/chown.2 @@ -68,7 +68,9 @@ but the change .Fa owner capability is restricted to the super-user. .Pp -.Fn Chown +The +.Fn chown +function clears the set-user-id and set-group-id bits on the file to prevent accidental or mischievous creation of @@ -78,13 +80,16 @@ by the super-user. follows symbolic links to operate on the target of the link rather than the link itself. .Pp -.Fn Fchown +The +.Fn fchown +function is particularly useful when used in conjunction with the file locking primitives (see .Xr flock 2 ) . .Pp -.Fn Lchown -is similar to +The +.Fn lchown +function is similar to .Fn chown but does not follow symbolic links. .Pp @@ -93,7 +98,8 @@ may be left unchanged by specifying it as -1. .Sh RETURN VALUES .Rv -std .Sh ERRORS -.Fn Chown +The +.Fn chown and .Fn lchown will fail and the file will be unchanged if: @@ -120,8 +126,9 @@ points outside the process's allocated address space. An I/O error occurred while reading from or writing to the file system. .El .Pp -.Fn Fchown -will fail if: +The +.Fn fchown +function will fail if: .Bl -tag -width Er .It Bq Er EBADF .Fa fd diff --git a/lib/libc/sys/chroot.2 b/lib/libc/sys/chroot.2 index 3b4d98d..cae864d 100644 --- a/lib/libc/sys/chroot.2 +++ b/lib/libc/sys/chroot.2 @@ -47,8 +47,9 @@ .Sh DESCRIPTION .Fa Dirname is the address of the pathname of a directory, terminated by an ASCII NUL. -.Fn Chroot -causes +The +.Fn chroot +function causes .Fa dirname to become the root directory, that is, the starting point for path searches of pathnames @@ -99,7 +100,9 @@ a value of -1 is returned and .Va errno is set to indicate an error. .Sh ERRORS -.Fn Chroot +The +.Fn chroot +function will fail and the root directory will be unchanged if: .Bl -tag -width Er .It Bq Er ENOTDIR diff --git a/lib/libc/sys/close.2 b/lib/libc/sys/close.2 index 409d9e2..9e9471b 100644 --- a/lib/libc/sys/close.2 +++ b/lib/libc/sys/close.2 @@ -104,8 +104,9 @@ which is to not close the descriptor. .Sh RETURN VALUES .Rv -std close .Sh ERRORS -.Fn Close -will fail if: +The +.Fn close +function will fail if: .Bl -tag -width Er .It Bq Er EBADF .Fa D diff --git a/lib/libc/sys/dup.2 b/lib/libc/sys/dup.2 index 2d57eab..c93ece0 100644 --- a/lib/libc/sys/dup.2 +++ b/lib/libc/sys/dup.2 @@ -48,7 +48,9 @@ .Ft int .Fn dup2 "int oldd" "int newd" .Sh DESCRIPTION -.Fn Dup +The +.Fn dup +function duplicates an existing object descriptor and returns its value to the calling process .Fa ( newd @@ -121,10 +123,11 @@ The external variable .Va errno indicates the cause of the error. .Sh ERRORS -.Fn Dup +The +.Fn dup and .Fn dup2 -fail if: +functions fail if: .Bl -tag -width Er .It Bq Er EBADF .Fa Oldd diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2 index 675f9b8..ff842da 100644 --- a/lib/libc/sys/execve.2 +++ b/lib/libc/sys/execve.2 @@ -45,7 +45,9 @@ .Ft int .Fn execve "const char *path" "char *const argv[]" "char *const envp[]" .Sh DESCRIPTION -.Fn Execve +The +.Fn execve +function transforms the calling process into a new process. The new process is constructed from an ordinary file, whose name is pointed to by @@ -202,7 +204,9 @@ return value will be -1 and the global variable .Va errno is set to indicate the error. .Sh ERRORS -.Fn Execve +The +.Fn execve +function will fail and return to the calling process if: .Bl -tag -width Er .It Bq Er ENOTDIR diff --git a/lib/libc/sys/fcntl.2 b/lib/libc/sys/fcntl.2 index e6ddee9..6635e31 100644 --- a/lib/libc/sys/fcntl.2 +++ b/lib/libc/sys/fcntl.2 @@ -45,8 +45,9 @@ .Ft int .Fn fcntl "int fd" "int cmd" "..." .Sh DESCRIPTION -.Fn Fcntl -provides for control over descriptors. +The +.Fn fcntl +function provides for control over descriptors. The argument .Fa fd is a descriptor to be operated on by @@ -387,8 +388,9 @@ Otherwise, a value of -1 is returned and .Va errno is set to indicate the error. .Sh ERRORS -.Fn Fcntl -will fail if: +The +.Fn fcntl +function will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The argument diff --git a/lib/libc/sys/flock.2 b/lib/libc/sys/flock.2 index f76b094..fc3e15c 100644 --- a/lib/libc/sys/flock.2 +++ b/lib/libc/sys/flock.2 @@ -49,8 +49,9 @@ .Ft int .Fn flock "int fd" "int operation" .Sh DESCRIPTION -.Fn Flock -applies or removes an +The +.Fn flock +function applies or removes an .Em advisory lock on the file associated with the file descriptor .Fa fd . diff --git a/lib/libc/sys/fork.2 b/lib/libc/sys/fork.2 index e20e4bb..f612104 100644 --- a/lib/libc/sys/fork.2 +++ b/lib/libc/sys/fork.2 @@ -46,8 +46,9 @@ .Ft pid_t .Fn fork void .Sh DESCRIPTION -.Fn Fork -causes creation of a new process. +The +.Fn fork +function causes creation of a new process. The new process (child process) is an exact copy of the calling process (parent process) except for the following: .Bl -bullet -offset indent @@ -89,8 +90,9 @@ variable .Va errno is set to indicate the error. .Sh ERRORS -.Fn Fork -will fail and no child process will be created if: +The +.Fn fork +function will fail and no child process will be created if: .Bl -tag -width Er .It Bq Er EAGAIN The system-imposed limit on the total -- cgit v1.1