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
MSGCTL ( 2 ) MSGCTL ( 2 ) NAME msgctl - message control operations SYNOPSIS #include #include #include int msgctl (msqid, cmd, buf) int msqid, cmd; struct msqid_ds •buf; DESCRIPTION Msgctl provides a variety of message control operations as specified by cmd. The following cmds are available: IPC_STAT Place the current value of each member of the data structure associated with msqid into the structure pointed to by buf. The contents of this structure are defined in intro(2). {READ} IPC_SET Set the value of the following members of the data structure associated with msqid to the corresponding value found in the structure pointed to by buf: msg_perm.uid msg_perm.gid msg_perm.mode /• only low 9 bits •/ msg_qbytes This cmd can only be executed by a process that has an effective user ID equal to either that of super user or to the value of msg_perm.uid in the data structure associated with msqid . Only super user can raise the value of msg_qbytes. IPC_RMID Remove the message queue identifier specified by msqid from the system and destroy the message queue and data structure associated with it. This cmd can only be executed by a process that has an effective user ID equal to either that of super user or to the value of msg_perm.uid in the data structure associated with msqid. Msgctl will fail if one or more of the following are true: Msqid is not a valid message queue identifier. IEINV AL] Cmd is not a valid command. IEINV AL] Cmd is equal to IPC_STAT and {READ} operation permission is denied to the calling process (see intro(2)). IEACCES] Cmd is equal to IPC_RMID or IPC_SET and the effective user ID of the calling process is not equal to that of super user and it is not equal to the value of msg_perm.uid in the data structure associated with msqid . IEPERM] Cmd is equal to IPC_SET, an attempt is being made to increase to the value of msg_qbytes, and the effective - 1 -
- Page 655 and 656: INTR0 (2) time_t shm_dtime; time_t
- 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
- Page 705: MOUNT (2) MOUNT (2) NAME mount - mo
- Page 709 and 710: MSGGET (2) MSGGET (2) NAME msgget -
- Page 711 and 712: MSGOP (2) MSGOP (2) NAME msgop - me
- Page 713 and 714: � I MSGOP {2) MSGOP {2) If (msgft
- Page 715: NICE (2) NICE (2) NAME nice - chang
- Page 718 and 719: OPEN ( 2) O_TRUNC O_EXCL OPEN(2) us
- Page 721 and 722: PAUSE( 2 ) PAUSE( 2 ) NAME pause -
- Page 723: PIPE( 2) PIPE ( 2) NAME pipe - crea
- Page 726 and 727: � ' )
- Page 729 and 730: PTRACE (2) PTRACE (2) NAME ptrace -
- Page 731 and 732: PTRACE (2) PTRACE (2) GENERAL ERROR
- Page 733: READ (2) READ (2) NAME read - read
- Page 736 and 737: SEMCTL (2) SEMCTL (2) the correspon
- Page 738 and 739: SEMGET (2) SEMGET (2) A semaphore i
- Page 740 and 741: SEMOP (2) SEMOP (2) process's semad
- Page 742 and 743: I I I I I I I I I I I I I I I I I I
- Page 745: SETUID ( 2 ) SETUID ( 2 ) NAME setu
- Page 748 and 749: SHMCTL (2) SHMCTL (2) to that of su
- Page 750 and 751: SHMGET (2) SHMGET (2) physical memo
- Page 752 and 753: SHMOP (2) SHMOP (2) Shmdt will fail
- Page 754 and 755: SIGNAL (2) SIGNAL (2) SIG_DFL - ter
MSGCTL ( 2 ) MSGCTL ( 2 )<br />
NAME<br />
msgctl - message control operations<br />
SYNOPSIS<br />
#include <br />
#include <br />
#include <br />
int msgctl (msqid, cmd, buf)<br />
int msqid, cmd;<br />
struct msqid_ds •buf;<br />
DESCRIPTION<br />
Msgctl provides a variety of message control operations as<br />
specified by cmd. The following cmds are available:<br />
IPC_STAT Place the current value of each member of the data<br />
structure associated with msqid into the structure<br />
pointed to by buf. The contents of this structure<br />
are defined in intro(2). {READ}<br />
IPC_SET Set the value of the following members of the data<br />
structure associated with msqid to the corresponding<br />
value found in the structure pointed to by buf:<br />
msg_perm.uid<br />
msg_perm.gid<br />
msg_perm.mode /• only low 9 bits •/<br />
msg_qbytes<br />
This cmd can only be executed by a process that has<br />
an effective user ID equal to either that of super user<br />
or to the value of msg_perm.uid in the data structure<br />
associated with msqid . Only super user can<br />
raise the value of msg_qbytes.<br />
IPC_RMID Remove the message queue identifier specified by<br />
msqid from the system and destroy the message<br />
queue and data structure associated with it. This<br />
cmd can only be executed by a process that has an<br />
effective user ID equal to either that of super user or<br />
to the value of msg_perm.uid in the data structure<br />
associated with msqid.<br />
Msgctl will fail if one or more of the following are true:<br />
Msqid is not a valid message queue identifier. IEINV AL]<br />
Cmd is not a valid command. IEINV AL]<br />
Cmd is equal to IPC_STAT and {READ} operation permission<br />
is denied to the calling process (see intro(2)).<br />
IEACCES]<br />
Cmd is equal to IPC_RMID or IPC_SET and the effective<br />
user ID of the calling process is not equal to that of super<br />
user and it is not equal to the value of msg_perm.uid in<br />
the data structure associated with msqid . IEPERM]<br />
Cmd is equal to IPC_SET, an attempt is being made to<br />
increase to the value of msg_qbytes, and the effective<br />
- 1 -