diff options
Diffstat (limited to 'lib/libc/gen/ftok.3')
-rw-r--r-- | lib/libc/gen/ftok.3 | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libc/gen/ftok.3 b/lib/libc/gen/ftok.3 index 8c90f7ffc3d..c9305fba1c1 100644 --- a/lib/libc/gen/ftok.3 +++ b/lib/libc/gen/ftok.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ftok.3,v 1.3 1996/10/02 13:51:34 michaels Exp $ +.\" $OpenBSD: ftok.3,v 1.4 1998/11/15 19:19:55 deraadt Exp $ .\" .\" Copyright (c) 1994 SigmaSoft, Th. Lockert <tholo@sigmasoft.com> .\" All rights reserved. @@ -35,7 +35,7 @@ .Fd #include <sys/types.h> .Fd #include <sys/ipc.h> .Ft key_t -.Fn ftok "const char *path" "char id" ; +.Fn ftok "const char *path" "int id" ; .Sh DESCRIPTION The .Fn ftok @@ -55,10 +55,13 @@ must specify an existing file that is accessible to the calling process or the call will fail. Also, note that links to files will return the same key, given the same .Fa id . +Only the 8 least significant bits of +.Fa id +are used in the key generation; the rest of the bits are ignored. .Sh RETURN VALUES The .Fn ftok -function will return -1 if +function will return (key_t)-1 if .Fa path does not exist or if it cannot be accessed by the calling process. .Sh SEE ALSO |