AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
INTRO ( 2) INTR0 (2) A semaphore is a data structure that contains the following members: ushort short ushort ushort semval; sempid; semncnt; semzcnt; I* semaphore value *I I* pid of last operation *I I* # awaiting semval > cval *I I* # awaiting semval = 0 *I Semva.l is a non-negative integer. Sempid is equal to the process ID of the last process that performed a semaphore operation on this semaphore. Semncnt is a count of the number of processes that are currently suspended awaiting this semaphore's semval to become greater than its current value. Semzcnt is a count of the number of processes that are currently suspended awaiting this semaphore's semval to become zero. Semaphore Operation Permissions. In the semop(2) and semctl(2) system call descriptions, the permission required for an operation is interpreted as follows: 00400 Read by user 00200 Alter by user 00060 Read, Alter by group 00006 Read, Alter by others Read and Alter permissions on a semid are granted to a process if one or more of the following are true: The process's effective user ID is super-user. The process's effective user ID matches sem_perm.[c]uid in the data structure associated with semid and the appropriate bit of the "user" portion (0600) of sem_perm.mode is set. The process's effective user ID does not match sem_perm.[c]uid and the process's effective group ID matches sem_perm.[c]gid and the appropriate bit of the "group" portion (060) of sem_perm.mode is set. The process's effective user ID does not match sem_perm.[c]uid and the process's effective group ID does not match sem_perm.[c]gid and the appropriate bit of the "other" portion (06) of sem_perm.mode is set. Otherwise, the corresponding permissions are denied. Shared Memory Identifier A shared memory identifier (shmid) is a unique positive integer created by a shmget(2) system call. Each shmid has a segment of memory (referred to as a shared memory segment) and a data structure associated with it. The data structure is referred to as shmid_ds and contains the following members: struct int ushort ushort short time_t ipc_perm shm_perm; shm_segsz; shm_cpid; shm_lpid; shm_nattch; shm_atime; - 8- I* operation permission struct *I I* size of segment *I I* creator pid *I I* pid of last operation *I I* number of current attaches *I I* last attach time *I
INTR0 (2) time_t shm_dtime; time_t shm_ctime; INTR0 (2) I* last detach time *I I* last change time *I I* Times measured in sees since *I I* 00:00:00 GMT, Jan. 1, 1970 *I Shm_perm is a ipc_perm structure that specifies the shared memory operation permission (see below). This structure includes the following members: ushort cuid; I* creator user id *I ushort cgid; I* creator group id *I ushort uid; I* user id *I ushort gid; I* group id *I ushort mode; I* rlw permission *I 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 performed 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 interpreted as follows: 00400 Read by user 00200 Write by user 00060 Read, Write by group 00006 Read, Write by others Read and Write permissions on a shmid are granted to a process if one or more of the following are true: The process's effective user ID is super-user. The process's effective user ID matches shm_perm.[c] uid in the data structure associated with 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 the process's effective group ID matches shm_perm.[c]gid 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 the appropriate bit of the "other" portion (06) of shm_perm.mode is set. Otherwise, the corresponding permissions are denied. SEE ALSO intro(3). - 9-
- Page 605 and 606: UUCP {IC) UUCP {IC) NAME uucp, uulo
- Page 607 and 608: UUSTAT (IC) UUSTAT ( IC ) NAME uust
- Page 609 and 610: UUTO (lC} UUTO (lC} NAME uuto, uupi
- Page 611 and 612: UUX ( lC ) UUX ( lC ) NAME uux - UN
- Page 613 and 614: VAL(l) VAL(I) NAME val - validate s
- Page 615 and 616: VC (l) VC (l) NAME vc - version con
- Page 617: VC (l) VC ( l ) ::text Used for key
- Page 620 and 621: VI ( 1) vi file vi vi + n file vi +
- Page 622 and 623: VI (l) rn OAD Av MODIFYING TEXT Cha
- Page 624 and 625: VI ( 1 ) VI( 1) file to newtext :gf
- Page 626 and 627: VI (l) VI (l) :set x? Show value of
- Page 628 and 629: VI (l) VI ( 1) mapped to I, then if
- Page 630 and 631: VI (l) VI (l) won't be broken. Inse
- Page 632 and 633: � I . .... .,_ J _ . . ·
- Page 634 and 635: .. \ '-�� -·
- Page 637 and 638: WIIO (I) WHO(l) NAME who - who is o
- Page 639: WRITE ( l ) WRITE ( l ) NAME write
- Page 642 and 643: XARGS(l) XARGS (l) -nnumber Execute
- Page 645 and 646: YACC { I ) YACC { l ) NAME yacc - y
- Page 647 and 648: INTRO ( 2) INTR0 ( 2 ) NAME intro -
- Page 649 and 650: INTRO ( 2) INTR0 (2) 21 EISDffi Is
- Page 651 and 652: INTRO (2) INTRO ( 2) ProcO is the s
- Page 653: INTR0 (2) INTR0 (2) permission requ
- Page 657: ACCESS (2} ACCESS (2} NAME access -
- Page 661 and 662: ALARM (2) ALARM (2) NAME alarm - se
- Page 663: BRK(2) BRK ( 2 ) NAME brk, sbrk - c
- Page 667 and 668: CHMOD (2) CHMOD (2) NAME chmod - ch
- Page 669: CHOWN(2) CHOWN(2) NAME chown - chan
- Page 673 and 674: CLOSE ( 2) CLOSE (2) NAME close - c
- Page 675 and 676: CREAT ( 2 ) CREAT ( 2 ) NAME creat
- Page 677 and 678: DUP (2) DUP (2) NAME dup - duplicat
- Page 679 and 680: EXEC (2) EXEC (2) NAME execl, execv
- Page 681: EXEC (2) EXEC (2) Search perm1ss10n
- Page 684 and 685: EXIT (2) EXIT (2) WARNING See WARNI
- Page 686 and 687: FCNTL (2) FCNTL (2) immediately wit
- Page 689 and 690: FORK(2) FORK(2) NAME fork - create
- Page 691: GETPID ( 2} GETPID (2) NAME getpid,
- Page 694 and 695: I I I I I I I I I I I I I I I I I I
- Page 696 and 697: �-
- Page 699: LINK ( 2 ) LINK ( 2 ) NAME link - l
- Page 703 and 704: MKNOD (2) MKNOD (2) NAME mknod - ma
INTR0 (2)<br />
time_t shm_dtime;<br />
time_t shm_ctime;<br />
INTR0 (2)<br />
I* last detach time *I<br />
I* last change time *I<br />
I* Times measured in sees since *I<br />
I* 00:00:00 GMT, Jan. 1, 1970 *I<br />
Shm_perm is a ipc_perm structure that specifies the shared<br />
memory operation permission (see below). This structure includes<br />
the following members:<br />
ushort cuid; I* creator user id *I<br />
ushort cgid; I* creator group id *I<br />
ushort uid; I* user id *I<br />
ushort gid; I* group id *I<br />
ushort mode; I* rlw permission *I<br />
Shm_segsz specifies the size of the shared memory segment.<br />
Shm_cpid is the process id of the process that created the shared<br />
memory identifier. Shm_lpid is the process id of the last process<br />
that performed a shmop(2) operation. Shm_nattch is the<br />
number of processes that currently have this segment attached.<br />
Shm_atime is the time of the last shmat operation, shm_dtime<br />
is the time of the last shmdt operation, and shm_ctime is the<br />
time of the last shmctl(2) operation that changed one of the<br />
members of the above structure.<br />
Shared Memory Operation Permissions.<br />
In the shmop(2) and shmctl(2) system call descriptions, the permission<br />
required for an operation is interpreted as follows:<br />
00400 Read by user<br />
00200 Write by user<br />
00060 Read, Write by group<br />
00006 Read, Write by others<br />
Read and Write permissions on a shmid are granted to a process if<br />
one or more of the following are true:<br />
The process's effective user ID is super-user.<br />
The process's effective user ID matches shm_perm.[c] uid<br />
in the data structure associated with shmid and the<br />
appropriate bit of the "user" portion (0600) of<br />
shm_perm.mode is set.<br />
The process's effective user ID does not match<br />
shm_perm.[c]uid and the process's effective group ID<br />
matches shm_perm.[c]gid and the appropriate bit of the<br />
"group" portion (060) of shm_perm.mode is set.<br />
The process's effective user ID does not match<br />
shm_perm.[c]uid and the process's effective group ID<br />
does not match shm_perm.[c]gid and the appropriate<br />
bit of the "other" portion (06) of shm_perm.mode is<br />
set.<br />
Otherwise, the corresponding permissions are denied.<br />
SEE ALSO<br />
intro(3).<br />
- 9-