diff options
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/arc4random.3 | 9 | ||||
-rw-r--r-- | lib/libc/gen/getgrent.3 | 3 | ||||
-rw-r--r-- | lib/libc/gen/getmntinfo.3 | 3 | ||||
-rw-r--r-- | lib/libc/gen/getpwent.3 | 3 | ||||
-rw-r--r-- | lib/libc/gen/getusershell.3 | 3 | ||||
-rw-r--r-- | lib/libc/gen/lockf.3 | 18 | ||||
-rw-r--r-- | lib/libc/gen/msgctl.3 | 9 | ||||
-rw-r--r-- | lib/libc/gen/msgrcv.3 | 6 | ||||
-rw-r--r-- | lib/libc/gen/msgsnd.3 | 12 | ||||
-rw-r--r-- | lib/libc/gen/rand48.3 | 9 | ||||
-rw-r--r-- | lib/libc/gen/signal.3 | 3 | ||||
-rw-r--r-- | lib/libc/gen/ttyname.3 | 6 |
12 files changed, 56 insertions, 28 deletions
diff --git a/lib/libc/gen/arc4random.3 b/lib/libc/gen/arc4random.3 index 334bb7b..e83bb47 100644 --- a/lib/libc/gen/arc4random.3 +++ b/lib/libc/gen/arc4random.3 @@ -50,7 +50,8 @@ The .Fn arc4random function uses the key stream generator employed by the -arc4 cipher, which uses 8*8 8 bit S-Boxes. The S-Boxes +arc4 cipher, which uses 8*8 8 bit S-Boxes. +The S-Boxes can be in about .if t 2\u\s71700\s10\d .if n (2**1700) @@ -76,9 +77,11 @@ automatically initializes itself. .Xr srandomdev 3 .Sh HISTORY .Pa RC4 -has been designed by RSA Data Security, Inc. It was posted anonymously +has been designed by RSA Data Security, Inc. +It was posted anonymously to the USENET and was confirmed to be equivalent by several sources who -had access to the original cipher. Since +had access to the original cipher. +Since .Pa RC4 used to be a trade secret, the cipher is now referred to as .Pa ARC4 . diff --git a/lib/libc/gen/getgrent.3 b/lib/libc/gen/getgrent.3 index bb3cfb5..ffac782 100644 --- a/lib/libc/gen/getgrent.3 +++ b/lib/libc/gen/getgrent.3 @@ -200,6 +200,7 @@ The functions and .Fn setgrent leave their results in an internal static object and return -a pointer to that object. Subsequent calls to +a pointer to that object. +Subsequent calls to the same function will modify the same object. diff --git a/lib/libc/gen/getmntinfo.3 b/lib/libc/gen/getmntinfo.3 index d20fc5b..f1a7fa5 100644 --- a/lib/libc/gen/getmntinfo.3 +++ b/lib/libc/gen/getmntinfo.3 @@ -99,7 +99,8 @@ The .Fn getmntinfo function writes the array of structures to an internal static object and returns -a pointer to that object. Subsequent calls to +a pointer to that object. +Subsequent calls to .Fn getmntinfo will modify the same object. .Pp diff --git a/lib/libc/gen/getpwent.3 b/lib/libc/gen/getpwent.3 index 57803da..d925055 100644 --- a/lib/libc/gen/getpwent.3 +++ b/lib/libc/gen/getpwent.3 @@ -214,6 +214,7 @@ The functions and .Fn getpwuid , leave their results in an internal static object and return -a pointer to that object. Subsequent calls to +a pointer to that object. +Subsequent calls to the same function will modify the same object. diff --git a/lib/libc/gen/getusershell.3 b/lib/libc/gen/getusershell.3 index 62eaafa..8541762 100644 --- a/lib/libc/gen/getusershell.3 +++ b/lib/libc/gen/getusershell.3 @@ -94,6 +94,7 @@ function appeared in The .Fn getusershell function leaves its result in an internal static object and returns -a pointer to that object. Subsequent calls to +a pointer to that object. +Subsequent calls to .Fn getusershell will modify the same object. diff --git a/lib/libc/gen/lockf.3 b/lib/libc/gen/lockf.3 index 1cfc40a..fe877bd 100644 --- a/lib/libc/gen/lockf.3 +++ b/lib/libc/gen/lockf.3 @@ -96,7 +96,8 @@ detects if a lock by another process is present on the specified section. The .Fa size argument is the number of contiguous bytes to be locked or -unlocked. The section to be locked or unlocked starts at the current +unlocked. +The section to be locked or unlocked starts at the current offset in the file and extends forward for a positive size or backward for a negative size (the preceding bytes up to but not including the current offset). However, it is not permitted to lock a section that @@ -112,9 +113,11 @@ The sections locked with or .Dv F_TLOCK may, in whole or in part, contain or be contained by a previously -locked section for the same process. When this occurs, or if adjacent +locked section for the same process. +When this occurs, or if adjacent locked sections would occur, the sections are combined into a single -locked section. If the request would cause the number of locks to +locked section. +If the request would cause the number of locks to exceed a system-imposed limit, the request will fail. .Pp .Dv F_LOCK @@ -133,15 +136,18 @@ file descriptor for the file. .Pp .Dv F_ULOCK requests release (wholly or in part) one or more locked sections -controlled by the process. Locked sections will be unlocked starting +controlled by the process. +Locked sections will be unlocked starting at the current file offset through .Fa size bytes or to the end of file if size is 0. When all of a locked section is not released (that is, when the beginning or end of the area to be unlocked falls within a locked section), the remaining portions of -that section are still locked by the process. Releasing the center +that section are still locked by the process. +Releasing the center portion of a locked section will cause the remaining locked beginning -and end portions to become two separate locked sections. If the +and end portions to become two separate locked sections. +If the request would cause the number of locks in the system to exceed a system-imposed limit, the request will fail. .Pp diff --git a/lib/libc/gen/msgctl.3 b/lib/libc/gen/msgctl.3 index 326e8a5..e95284c 100644 --- a/lib/libc/gen/msgctl.3 +++ b/lib/libc/gen/msgctl.3 @@ -131,7 +131,8 @@ or in the data structure associated with the message queue. The value of .Va msg_qbytes -can only be increased by the super-user. Values for +can only be increased by the super-user. +Values for .Va msg_qbytes that exceed the system limit (MSGMNB from .Aq Pa sys/msg.h ) @@ -140,7 +141,8 @@ are silently truncated to that limit. .It Dv IPC_RMID Remove the message queue specified by .Fa msqid -and destroy the data associated with it. Only the super-user or a process +and destroy the data associated with it. +Only the super-user or a process with an effective uid equal to the .Va msg_perm.cuid or @@ -167,7 +169,8 @@ effective gid can match either or .Va msg_perm.gid . .Sh RETURN VALUES -Upon successful completion, a value of 0 is returned. Otherwise, -1 is +Upon successful completion, a value of 0 is returned. +Otherwise, -1 is returned and the global variable .Va errno is set to indicate the error. diff --git a/lib/libc/gen/msgrcv.3 b/lib/libc/gen/msgrcv.3 index e4aa45d..846ac6f 100644 --- a/lib/libc/gen/msgrcv.3 +++ b/lib/libc/gen/msgrcv.3 @@ -83,7 +83,8 @@ will be received. .El .Pp .Fa msgsz -specifies the maximum length of the requested message. If the received +specifies the maximum length of the requested message. +If the received message has a length greater than .Fa msgsz it will be silently truncated if the @@ -100,7 +101,8 @@ depends on whether the .Dv IPC_NOWAIT flag is set in .Fa msgflg -or not. If +or not. +If .Dv IPC_NOWAIT is set, .Fn msgrcv diff --git a/lib/libc/gen/msgsnd.3 b/lib/libc/gen/msgsnd.3 index d6812e2..2ede183 100644 --- a/lib/libc/gen/msgsnd.3 +++ b/lib/libc/gen/msgsnd.3 @@ -49,7 +49,8 @@ The function sends a message to the message queue specified in .Fa msqid . .Fa msgp -points to a structure containing the message. This structure should +points to a structure containing the message. +This structure should consist of the following members: .Bd -literal long mtype; /* message type */ @@ -78,7 +79,8 @@ If .Fa msgflg has .Dv IPC_NOWAIT -mask set in it, the call will return immediately. If +mask set in it, the call will return immediately. +If .Fa msgflg does not have .Dv IPC_NOWAIT @@ -93,7 +95,8 @@ The message queue is removed, in which case -1 will be returned, and is set to .Er EINVAL . .It -The caller catches a signal. The call returns with +The caller catches a signal. +The call returns with .Va errno set to .Er EINTR . @@ -116,7 +119,8 @@ is set to the pid of the calling process. is set to the current time. .El .Sh RETURN VALUES -Upon successful completion, 0 is returned. Otherwise, -1 is returned and +Upon successful completion, 0 is returned. +Otherwise, -1 is returned and .Va errno is set to indicate the error. .Sh ERRORS diff --git a/lib/libc/gen/rand48.3 b/lib/libc/gen/rand48.3 index 86e7a2f..ac7e33e 100644 --- a/lib/libc/gen/rand48.3 +++ b/lib/libc/gen/rand48.3 @@ -50,7 +50,8 @@ The .Fn rand48 family of functions generates pseudo-random numbers using a linear -congruential algorithm working on integers 48 bits in size. The +congruential algorithm working on integers 48 bits in size. +The particular formula employed is r(n+1) = (a * r(n) + c) mod m where the default values are @@ -64,7 +65,8 @@ computational step is to perform a single iteration of the algorithm. .Fn drand48 and .Fn erand48 -return values of type double. The full 48 bits of r(n+1) are +return values of type double. +The full 48 bits of r(n+1) are loaded into the mantissa of the returned value, with the exponent set such that the values produced lie in the interval [0.0, 1.0). .Pp @@ -119,7 +121,8 @@ also initializes the internal buffer r(n) of and .Fn mrand48 , but here all 48 bits of the seed can be specified in an array of 3 shorts, -where the zeroth member specifies the lowest bits. Again, +where the zeroth member specifies the lowest bits. +Again, the constant multiplicand and addend of the algorithm are reset to the default values given above. .Fn seed48 diff --git a/lib/libc/gen/signal.3 b/lib/libc/gen/signal.3 index 3da89d8..589331f 100644 --- a/lib/libc/gen/signal.3 +++ b/lib/libc/gen/signal.3 @@ -147,7 +147,8 @@ To ignore the signal should be .Dv SIG_IGN . This will cause subsequent instances of the signal to be ignored -and pending instances to be discarded. If +and pending instances to be discarded. +If .Dv SIG_IGN is not used, further occurrences of the signal are diff --git a/lib/libc/gen/ttyname.3 b/lib/libc/gen/ttyname.3 index 719b9fb..5e7bb4e 100644 --- a/lib/libc/gen/ttyname.3 +++ b/lib/libc/gen/ttyname.3 @@ -50,7 +50,8 @@ .Fn ttyslot void .Sh DESCRIPTION These functions operate on the system file descriptors for terminal -type devices. These descriptors are not related to the standard +type devices. +These descriptors are not related to the standard .Tn I/O .Dv FILE typedef, but refer to the special device files found in @@ -122,6 +123,7 @@ appeared in The .Fn ttyname function leaves its result in an internal static object and returns -a pointer to that object. Subsequent calls to +a pointer to that object. +Subsequent calls to .Fn ttyname will modify the same object. |