HP-UX Reference (11i v2 04/09) - 7 Device (Special) Files, 9 General Information, Index (vol 10)
s
glossary(9) glossary(9)
ushort shm_lpid; /* pid of last operation */
uint shm_nattch; /* number of current attaches */
time_t shm_atime; /* last attach time */
time_t shm_dtime; /* last detach time */
time_t shm_ctime; /* last change time */
/* Times measured in secs since */
/* 00:00:00 GMT, Jan. 1, 1970 */
Shared memory identifiers can be created using ftok (3C).
shm_perm is a ipc_perm structure that specifies the permission for a shmop (2) or shmctl (2) operation
(see below). This structure includes the following members:
ushort cuid; /* creator user id */
ushort cgid; /* creator group id */
ushort uid; /* user id */
ushort gid; /* group id */
ushort mode; /* r/w permission */
shm_segsz specifies the size of the shared memory segment.
shm_cpid is the process id of the process
that created the shared memory identifier.
shm_lpid is the process id of the last process that per-
formed a shmop(2) operation.
shm_nattch is the number of processes that currently have this segment
attached. shm_atime is the time of the last shmat operation, shm_dtime is the time of the last
shmdt operation, and shm_ctime is the time of the last shmctl (2) operation that changed one of the
members of the above structure.
shared memory operation permissions
In the shmop(2) and shmctl (2) system call descriptions, the permission required for an operation is indi-
cated for each operation. Whether a particular process has the permission to perform a shmop(2) or
shmctl (2) operation on an object is determined by the object’s permission mode bits as follows:
00400 Read by user
00200 Write by user
00060 Read, Write by group
00006 Read, Write by others
Read and Write permissions for a shmop(2) or shmctl (2) operation on a shared memory identifier
(shmid) are granted to a process if one or more of the following are true:
• The process’s effective user ID is superuser.
• The process’s effective user ID matches
shm_perm.[c]uid in the data structure associated with
the shmid and the appropriate bit of the "user" portion (0600) of
shm_perm.mode is set.
• The process’s effective user ID does not match
shm_perm.[c]uid and either the process’s effective
group ID matches
shm_perm.[c]gid or one of shm_perm.[c]gid is in the process’s group access
list and the appropriate bit of the "group" portion (060) of
shm_perm.mode is set.
• The process’s effective user ID does not match
shm_perm.[c]uid and the process’s effective group
ID does not match shm_perm.[c]gid and neither of shm_perm.[c]gid is in the process’s group
access list and the appropriate bit of the "other" portion (06) of shm_perm.mode is set.
Otherwise, the corresponding permissions are denied.
shell
A user interface to the HP-UX operating system. A shell often functions as both a command interpreter
and an interpretive programming language. A shell is automatically invoked for every user who logs in.
See sh(1) and its related manual entries plus the tutorials supplied with your system for details.
shell program
See shell script.
shell script
A sequence of shell commands and shell programming language constructs stored in a file and invoked as
a user command (program). No compilation is needed prior to execution because the shell recognizes the
commands and constructs that make up the shell programming language. A shell script is often called a
shell program or a command file. See the Shells User Guide.
Section 9−−22 Hewlett-Packard Company − 21 − HP-UX 11i Version 2: September 2004