Loading...
sys/shm_open.2 Libc-262 Libc-583
--- Libc/Libc-262/sys/shm_open.2
+++ Libc/Libc-583/sys/shm_open.2
@@ -20,7 +20,7 @@
 .\" 
 .\" @APPLE_LICENSE_HEADER_END@
 .\"
-.Dd September 20, 1999
+.Dd August 29, 2008
 .Dt SHM_OPEN 2
 .Os Darwin
 .Sh NAME
@@ -29,12 +29,18 @@
 .Sh SYNOPSIS
 .Fd #include <sys/mman.h>
 .Ft int
-.Fn shm_open "const char *name" "int flags" "mode_t mode"
+.Fo shm_open
+.Fa "const char *name"
+.Fa "int oflag"
+.Fa "..."
+.Fc
+.Pp
+The parameter "mode_t mode" is optional.
 .Sh DESCRIPTION
 The shared memory object referenced by
 .Fa name
 is opened for reading and/or writing as specified by the argument
-.Fa flags
+.Fa oflag
 and the file descriptor returned to the calling process.
 The returned file descriptor will be the lowest non-open file
 descriptor for the calling process, and is not shared with any
@@ -51,7 +57,7 @@
 object, provided that the object has not been unlinked by a call to
 .Fn shm_unlink .
 The
-.Fa flags
+.Fa oflag
 argument may indicate the file is to be
 created if it does not exist (by specifying the
 .Dv O_CREAT
@@ -62,7 +68,9 @@
 and modified by the process' umask value (see
 .Xr umask 2 ) .
 .Pp
-The flags specified are formed by
+The value of
+.Fa oflag
+is formed by
 .Em or Ns 'ing
 the following values:
 .Pp
@@ -112,13 +120,6 @@
 it unlinked and all other references are gone. Objects do
 not persist across a system reboot.
 .Pp
-The new descriptor is set to remain open across
-.Xr execve
-system calls; see
-.Xr close 2
-and
-.Xr fcntl 2 .
-.Pp
 The system imposes a limit on the number of file descriptors
 open simultaneously by one process.
 .Xr Getdtablesize 2
@@ -150,9 +151,12 @@
 The process has already reached its limit for open file descriptors.
 .It Bq Er ENAMETOOLONG
 .Fa name
-exceeded
-.Dv SHM_NAME_MAX
-characters.
+exceeded the name size limit.
+This is currently
+.Dv PSHMNAMLEN
+characters (defined in
+.In sys/posix_shm.h ) ,
+but this may change in the future.
 .It Bq Er ENFILE
 The system file table is full.
 .It Bq Er ENOENT