Copyright Digital Equipment Corp. All rights reserved.

Return_Values

   n                  Upon success, a nonnegative integer
                      representing the lowest numbered unused file
                      descriptor. The file descriptor points to the
                      shared memory object.
   -1                 Indicates failure. errno is set to indicate
                      the error:

                      o  EACCES - Permission to create the shared
                         memory object is denied, or the shared
                         memory object exists and the permissions
                         specified by oflag are denied, or O_TRUNC
                         is specified and write permission is
                         denied.

                      o  EEXIST - O_CREAT and O_EXCL are set, but
                         the named shared memory object already
                         exists.

                      o  EINTR - A signal has interrupted the shm_
                         open operation.

                      o  EINVAL - The shm_open operation is not
                         supported for the given name.

                      o  EMFILE - Too many file descriptors are
                         currently in use by this process.

                      o  ENAMETOOLONG - The length of the name
                         argument exceeds PATH_MAX or a pathname
                         component is longer than NAME_MAX.

                      o  ENFILE - Too many shared memory objects are
                         currently open in the system.

                      o  ENOENT - O_CREAT is not set and the named
                         shared memory object does not exist.

                      o  ENOSPC - Memory space for creation of the
                         new shared memory object is insufficient.