.\" -*- coding: UTF-8 -*- .\" Copyright 1993 Giorgio Ciucci (giorgio@crcc.it) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" FIXME . There is now duplication of some of the information .\" below in semctl.2, msgctl.2, and shmctl.2 -- MTK, Nov 04 .\" .\" FIXME . Ultimately, there should probably be .\" svmq_overview(7), svshm_overview(7), and svsem_overview(7) .\" that provide an overview of each System V IPC mechanism. .\" In that case: .\" * Those files should add a discussion of the /proc/sysvipc .\" interfaces. .\" * Documentation of the various /proc interfaces should move into .\" those files (from proc(5)), and references in the various *.2 .\" pages that refer to the /proc files should be adjusted. .\" * The only part that uniquely belongs in sysvipc(7) is perhaps .\" the discussion of ipc_perm. .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH SVIPC 7 "10 outubro 2019" Linux "Manual do Programador do Linux" .SH NOME sysvipc \- mecanismo de inter\-comunicação do System V .SH SINOPSE .nf \fB#include \fP \fB#include \fP \fB#include \fP .fi .SH DESCRIÇÃO This manual page refers to the Linux implementation of the System V interprocess communication (IPC) mechanisms: message queues, semaphore sets, and shared memory segments. In the following, the word \fIresource\fP means an instantiation of one among such mechanisms. .SS "Resource access permissions" For each resource, the system uses a common structure of type \fIstruct ipc_perm\fP to store information needed in determining permissions to perform an IPC operation. The \fIipc_perm\fP structure includes the following members: .PP .in +4n .EX struct ipc_perm { uid_t cuid; /* creator user ID */ gid_t cgid; /* creator group ID */ uid_t uid; /* owner user ID */ gid_t gid; /* owner group ID */ unsigned short mode; /* r/w permissions */ }; .EE .in .PP The \fImode\fP member of the \fIipc_perm\fP structure defines, with its lower 9 bits, the access permissions to the resource for a process executing an IPC system call. The permissions are interpreted as follows: .PP .nf 0400 Read by user. 0200 Write by user. 0040 Read by group. 0020 Write by group. 0004 Read by others. 0002 Write by others. .fi .PP Os bits 0100, 0010 e 0001 (os bits para execução) não são usados pelo sistema. Em qualquer caso "escrita" significa efetivamente "modificar" para um conjunto de sinalizações. .PP O arquivo cabeçalho de sistema define as seguintes constantes simbólicas: .TP 14 \fBIPC_CREAT\fP Criar a entrada se a chave não existe. .TP \fBIPC_EXCL\fP Falhar se a chave existe. .TP \fBIPC_NOWAIT\fP Devolver um erro se a requesição esperar muito. .TP \fBIPC_PRIVATE\fP Chave privada. .TP \fBIPC_RMID\fP Remover recurso. .TP \fBIPC_SET\fP Selecionar uma opção do recurso. .TP \fBIPC_STAT\fP Obter opção do recurso. .PP Note that \fBIPC_PRIVATE\fP is a \fIkey_t\fP type, while all the other symbolic constants are flag fields and can be OR'ed into an \fIint\fP type variable. .SS "Fila de mensagens" Uma fila de mensagens é unicamente identificada por un inteiro positivo (its \fImsqid\fP) e possui uma estrutura de dados associada do tipo \fIstruct msquid_ds\fP, definida em \fI\fP, contendo os seguintes membros: .PP .in +4n .EX struct msqid_ds { struct ipc_perm msg_perm; msgqnum_t msg_qnum; /* no of messages on queue */ msglen_t msg_qbytes; /* bytes max on a queue */ pid_t msg_lspid; /* PID of last msgsnd(2) call */ pid_t msg_lrpid; /* PID of last msgrcv(2) call */ time_t msg_stime; /* last msgsnd(2) time */ time_t msg_rtime; /* last msgrcv(2) time */ time_t msg_ctime; /* last change time */ }; .EE .in .TP 11 \fImsg_perm\fP \fIipc_perm\fP estruturas que especificam a permissão de acesso na fila de mensagem. .TP \fImsg_qnum\fP Número de mensagems atualmente na fila de mensagens. .TP \fImsg_qbytes\fP Número máximo de bytes de texto de mensagem texto permetida na fila de mensagens. .TP \fImsg_lspid\fP ID do processo que executou a última chamada de sistema \fBmsgsnd\fP(2). .TP \fImsg_lrpid\fP ID do processo que executou a última chamada de sistema \fBmsgrcv\fP(2). .TP \fImsg_stime\fP A hora da última chamada de sistema \fBmsgsnd\fP(2). .TP \fImsg_rtime\fP A hora da última chamada de sistema \fBmsgrcv\fP(2). .TP \fImsg_ctime\fP A hora da última chamada de sistema que alterou um membro da estrutura \fImsqid_ds\fP. .SS "Conjunto sinalizador" Um conjunto sinalizador é unicamente identificado por um inteiro positivo (its \fIsemid\fP) e possui uma estrutura de dados associada do tipo \fIstruct semid_ds\fP, definida em \fI\fP, contendo os seguintes membros: .IP .in +4n .EX struct semid_ds { struct ipc_perm sem_perm; time_t sem_otime; /* last operation time */ time_t sem_ctime; /* last change time */ unsigned long sem_nsems; /* count of sems in set */ }; .EE .in .TP 11 \fIsem_perm\fP \fIipc_perm\fP estruturas que especificam a permissão de acesso no conjunto sinalizador. .TP \fIsem_otime\fP Hora da última chamada de sistema \fBsemop\fP(2). .TP \fIsem_ctime\fP Hora da última chamada de sistema \fBsemctl\fP(2) que alterou um membro de uma estrutura citada acima ou um dos sinais pertencentes ao conjunto. .TP \fIsem_nsems\fP Número de sinais no conjunto. Cada sinal de um conjunto é referenciado por um inteiro não negativo desde \fB0\fP até \fIsem_nsems\-1\fP. .PP Um sinal é uma estrutura de dados do tipo \fIstruct sem\fP contendo os seguintes membros: .PP .in +4n .EX .\" unsigned short semncnt; /* nr awaiting semval to increase */ .\" unsigned short semzcnt; /* nr awaiting semval = 0 */ struct sem { int semval; /* semaphore value */ int sempid; /* PID of process that last modified */ }; .EE .in .TP 11 \fIsemval\fP Valor do sinal: um interio não negativo. .TP \fIsempid\fP .\".TP .\".I semncnt .\"Number of processes suspended awaiting for .\".I semval .\"to increase. .\".TP .\".I semznt .\"Number of processes suspended awaiting for .\".I semval .\"to become zero. PID of the last process that modified the value of this semaphore. .SS "Shared memory segments" Um segmento compartilhado de memória é unicamente identificado por um inteiro positivo (its \fIshmid\fP) e possui uma estrutura de dados associada do tipo \fIstruct shmid_ds\fP, definida em \fI\fP, contendo os seguintes membros: .PP .in +4n .EX struct shmid_ds { struct ipc_perm shm_perm; size_t shm_segsz; /* size of segment */ pid_t shm_cpid; /* PID of creator */ pid_t shm_lpid; /* PID, last operation */ shmatt_t shm_nattch; /* no. of current attaches */ time_t shm_atime; /* time of last attach */ time_t shm_dtime; /* time of last detach */ time_t shm_ctime; /* time of last change */ }; .EE .in .TP 11 \fIshm_perm\fP \fIipc_perm\fP estrutura que especifica as permissões de acesso no segmento compartilhado de memória. .TP \fIshm_segsz\fP Tamanho em bytes do segmento compartilhado de memória. .TP \fIshm_cpid\fP ID do processo que criou o segmento compartilhado de memória .TP \fIshm_lpid\fP ID do úlitmo processo que executou uma chamada de sistema \fBshmat\fP(2) ou \fBshmdt\fP(2). .TP \fIshm_nattch\fP Número de uniões atuais ativas para este segmento compartilhado de memória. .TP \fIshm_atime\fP Hora da úlitma chamada de sistema \fBshmat\fP(2). .TP \fIshm_dtime\fP A hora da última chamada de sistema \fBshmdt\fP(2). .TP \fIshm_ctime\fP Hora da última chamada de sistema \fBshmctl\fP(2) que alterou \fIshmid_ds\fP. .SS "IPC namespaces" For a discussion of the interaction of System V IPC objects and IPC namespaces, see \fBipc_namespaces\fP(7). .SH "VEJA TAMBÉM" \fBipcmk\fP(1), \fBipcrm\fP(1), \fBipcs\fP(1), \fBlsipc\fP(1), \fBipc\fP(2), \fBmsgctl\fP(2), \fBmsgget\fP(2), \fBmsgrcv\fP(2), \fBmsgsnd\fP(2), \fBsemctl\fP(2), \fBsemget\fP(2), \fBsemop\fP(2), \fBshmat\fP(2), \fBshmctl\fP(2), \fBshmdt\fP(2), \fBshmget\fP(2), \fBftok\fP(3), \fBipc_namespaces\fP(7) .SH COLOFÃO Esta página faz parte da versão 5.04 do projeto Linux \fIman\-pages\fP. Uma descrição do projeto, informações sobre relatórios de bugs e a versão mais recente desta página podem ser encontradas em \%https://www.kernel.org/doc/man\-pages/. .SH TRADUÇÃO A tradução para português brasileiro desta página man foi criada por André Luiz Fassone e Carlos Augusto Horylka . Esta tradução é uma documentação livre; leia a .UR https://www.gnu.org/licenses/gpl-3.0.html Licença Pública Geral GNU Versão 3 .UE ou posterior para as condições de direitos autorais. Nenhuma responsabilidade é aceita. Se você encontrar algum erro na tradução desta página de manual, envie um e-mail para .MT debian-l10n-portuguese@\:lists.\:debian.\:org a lista de discussão de tradutores .ME .