summaryrefslogtreecommitdiff
path: root/lib/libc/gen/ftok.3
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-11-15 19:19:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-11-15 19:19:56 +0000
commit3843a539f3c3ff183976487c26f9c10c6592f889 (patch)
tree336a22816f2e97b47ea64e9bfd86b198b7f44e04 /lib/libc/gen/ftok.3
parent5ed8ade2e8750d7fcf6b0d0a143fc3cdef387b97 (diff)
ftok() takes int id; xpg
Diffstat (limited to 'lib/libc/gen/ftok.3')
-rw-r--r--lib/libc/gen/ftok.39
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