| 1 |
# French translation of manpages |
| 2 |
# This file is distributed under the same license as the manpages-l10n package. |
| 3 |
# Copyright © of this file: |
| 4 |
# Christophe Blaess <https://www.blaess.fr/christophe/>, 1996-2003. |
| 5 |
# Stéphan Rafin <[email protected]>, 2002. |
| 6 |
# Thierry Vignaud <[email protected]>, 1999,2002. |
| 7 |
# François Micaux, 2002. |
| 8 |
# Alain Portal <[email protected]>, 2003-2008. |
| 9 |
# Jean-Philippe Guérard <[email protected]>, 2005-2006. |
| 10 |
# Jean-Luc Coulon (f5ibh) <[email protected]>, 2006-2007. |
| 11 |
# Julien Cristau <[email protected]>, 2006-2007. |
| 12 |
# Thomas Huriaux <[email protected]>, 2006-2008. |
| 13 |
# Nicolas François <[email protected]>, 2006-2008. |
| 14 |
# Florentin Duneau <[email protected]>, 2006-2010. |
| 15 |
# Simon Paillard <[email protected]>, 2006, 2012-2014. |
| 16 |
# Denis Barbier <[email protected]>, 2006,2010. |
| 17 |
# David Prévot <[email protected]>, 2010-2014. |
| 18 |
# Lucien Gentis <[email protected]>, 2022. |
| 19 |
msgid "" |
| 20 |
msgstr "" |
| 21 |
"Project-Id-Version: perkamon\n" |
| 22 |
"POT-Creation-Date: 2026-06-05 06:43+0200\n" |
| 23 |
"PO-Revision-Date: 2023-04-14 13:31+0200\n" |
| 24 |
"Last-Translator: Lucien Gentis <[email protected]>\n" |
| 25 |
"Language-Team: French <[email protected]>\n" |
| 26 |
"Language: fr\n" |
| 27 |
"MIME-Version: 1.0\n" |
| 28 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 29 |
"Content-Transfer-Encoding: 8bit\n" |
| 30 |
"Plural-Forms: nplurals=2; plural=n > 1;\n" |
| 31 |
"X-Generator: Poedit 2.4.2\n" |
| 32 |
"X-Poedit-Bookmarks: 129,-1,-1,-1,-1,-1,-1,-1,-1,-1\n" |
| 33 |
|
| 34 |
#. type: TH |
| 35 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 36 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 37 |
#, no-wrap |
| 38 |
msgid "shm_open" |
| 39 |
msgstr "shm_open" |
| 40 |
|
| 41 |
#. type: TH |
| 42 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 43 |
#: opensuse-tumbleweed |
| 44 |
#, no-wrap |
| 45 |
msgid "2026-02-08" |
| 46 |
msgstr "8 février 2026" |
| 47 |
|
| 48 |
#. type: TH |
| 49 |
#: archlinux debian-unstable |
| 50 |
#, no-wrap |
| 51 |
msgid "Linux man-pages 6.18" |
| 52 |
msgstr "Pages du manuel de Linux 6.18" |
| 53 |
|
| 54 |
#. type: SH |
| 55 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 56 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 57 |
#, no-wrap |
| 58 |
msgid "NAME" |
| 59 |
msgstr "NOM" |
| 60 |
|
| 61 |
#. type: Plain text |
| 62 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 63 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 64 |
msgid "" |
| 65 |
"shm_open, shm_unlink - create/open or unlink POSIX shared memory objects" |
| 66 |
msgstr "" |
| 67 |
"shm_open, shm_unlink - Créer, ouvrir ou supprimer des objets en mémoire " |
| 68 |
"partagée POSIX" |
| 69 |
|
| 70 |
#. type: SH |
| 71 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 72 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 73 |
#, no-wrap |
| 74 |
msgid "LIBRARY" |
| 75 |
msgstr "BIBLIOTHÈQUE" |
| 76 |
|
| 77 |
#. type: Plain text |
| 78 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 79 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 80 |
msgid "Real-time library (I<librt>,\\ I<-lrt>)" |
| 81 |
msgstr "Bibliothèque de temps réel (I<librt>,\\ I<-lrt>)" |
| 82 |
|
| 83 |
#. type: SH |
| 84 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 85 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 86 |
#, no-wrap |
| 87 |
msgid "SYNOPSIS" |
| 88 |
msgstr "SYNOPSIS" |
| 89 |
|
| 90 |
#. type: Plain text |
| 91 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 92 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 93 |
#, no-wrap |
| 94 |
msgid "" |
| 95 |
"B<#include E<lt>sys/mman.hE<gt>>\n" |
| 96 |
"B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */\n" |
| 97 |
"B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */\n" |
| 98 |
msgstr "" |
| 99 |
"B<#include E<lt>sys/mman.hE<gt>>\n" |
| 100 |
"B<#include E<lt>sys/stat.hE<gt>> /* Pour les constantes de mode */\n" |
| 101 |
"B<#include E<lt>fcntl.hE<gt>> /* Pour les constantes O_* */\n" |
| 102 |
|
| 103 |
#. type: Plain text |
| 104 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 105 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 106 |
#, no-wrap |
| 107 |
msgid "" |
| 108 |
"B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>\n" |
| 109 |
"B<int shm_unlink(const char *>I<name>B<);>\n" |
| 110 |
msgstr "" |
| 111 |
"B<int shm_open(const char *>I<nom>B<, int >I<masque>B<, mode_t >I<mode>B<);>\n" |
| 112 |
"B<int shm_unlink(const char *>I<nom>B<);>\n" |
| 113 |
|
| 114 |
#. type: SH |
| 115 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 116 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 117 |
#, no-wrap |
| 118 |
msgid "DESCRIPTION" |
| 119 |
msgstr "DESCRIPTION" |
| 120 |
|
| 121 |
#. type: Plain text |
| 122 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 123 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 124 |
msgid "" |
| 125 |
"B<shm_open>() creates and opens a new, or opens an existing, POSIX shared " |
| 126 |
"memory object. A POSIX shared memory object is in effect a handle which can " |
| 127 |
"be used by unrelated processes to B<mmap>(2) the same region of shared " |
| 128 |
"memory. The B<shm_unlink>() function performs the converse operation, " |
| 129 |
"removing an object previously created by B<shm_open>()." |
| 130 |
msgstr "" |
| 131 |
"La fonction B<shm_open>() crée et ouvre un nouvel objet en mémoire partagée " |
| 132 |
"POSIX, ou ouvre un objet existant. Il s'agit d'un descripteur utilisable par " |
| 133 |
"des processus indépendants pour projeter la même région mémoire à l'aide de " |
| 134 |
"B<mmap>(2). La fonction B<shm_unlink>() réalise l'opération inverse en " |
| 135 |
"supprimant l'objet créé précédemment par B<shm_open>()." |
| 136 |
|
| 137 |
#. glibc allows the initial slash to be omitted, and makes |
| 138 |
#. multiple initial slashes equivalent to a single slash. |
| 139 |
#. This differs from the implementation of POSIX message queues. |
| 140 |
#. glibc allows subdirectory components in the name, in which |
| 141 |
#. case the subdirectory must exist under /dev/shm, and allow the |
| 142 |
#. required permissions if a user wants to create a shared memory |
| 143 |
#. object in that subdirectory. |
| 144 |
#. type: Plain text |
| 145 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 146 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 147 |
msgid "" |
| 148 |
"The operation of B<shm_open>() is analogous to that of B<open>(2). I<name> " |
| 149 |
"specifies the shared memory object to be created or opened. For portable " |
| 150 |
"use, a shared memory object should be identified by a name of the form I</" |
| 151 |
"somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., " |
| 152 |
"255) characters consisting of an initial slash, followed by one or more " |
| 153 |
"characters, none of which are slashes." |
| 154 |
msgstr "" |
| 155 |
"Le fonctionnement de B<shm_open>() est analogue à celui de B<open>(2). " |
| 156 |
"I<nom> indique l'objet en mémoire partagée à créer ou ouvrir. Pour un " |
| 157 |
"fonctionnement portable, un objet en mémoire partagée doit être identifié " |
| 158 |
"par un nom au format I</un_nom> ; c'est-à-dire une chaîne terminée par un " |
| 159 |
"octet de valeur zéro d'au plus B<NAME_MAX> (c'est-à-dire 255) caractères, et " |
| 160 |
"commençant par une barre oblique (« / ») suivie d'un caractère ou plus, ces " |
| 161 |
"derniers n'étant pas des barres obliques." |
| 162 |
|
| 163 |
#. type: Plain text |
| 164 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 165 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 166 |
msgid "" |
| 167 |
"I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> " |
| 168 |
"or B<O_RDWR> and any of the other flags listed here:" |
| 169 |
msgstr "" |
| 170 |
"I<masque> est un masque de bits associant à l'aide d'un OU logique une et " |
| 171 |
"une seule des deux constantes B<O_RDONLY> ou B<O_RDWR> et un ou plusieurs " |
| 172 |
"des attributs décrits ci-après :" |
| 173 |
|
| 174 |
#. type: TP |
| 175 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 176 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 177 |
#, no-wrap |
| 178 |
msgid "B<O_RDONLY>" |
| 179 |
msgstr "B<O_RDONLY>" |
| 180 |
|
| 181 |
#. type: Plain text |
| 182 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 183 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 184 |
msgid "" |
| 185 |
"Open the object for read access. A shared memory object opened in this way " |
| 186 |
"can be B<mmap>(2)ed only for read (B<PROT_READ>) access." |
| 187 |
msgstr "" |
| 188 |
"Ouvrir l'objet en lecture seule. Un tel objet ne pourra être projeté en " |
| 189 |
"mémoire avec B<mmap>(2) qu'avec un accès en lecture (B<PROT_READ>)." |
| 190 |
|
| 191 |
#. type: TP |
| 192 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 193 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 194 |
#, no-wrap |
| 195 |
msgid "B<O_RDWR>" |
| 196 |
msgstr "B<O_RDWR>" |
| 197 |
|
| 198 |
#. type: Plain text |
| 199 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 200 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 201 |
msgid "Open the object for read-write access." |
| 202 |
msgstr "Ouvrir l'objet en lecture et écriture." |
| 203 |
|
| 204 |
#. type: TP |
| 205 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 206 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 207 |
#, no-wrap |
| 208 |
msgid "B<O_CREAT>" |
| 209 |
msgstr "B<O_CREAT>" |
| 210 |
|
| 211 |
#. In truth it is actually the filesystem IDs on Linux, but these |
| 212 |
#. are nearly always the same as the effective IDs. (MTK, Jul 05) |
| 213 |
#. type: Plain text |
| 214 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 215 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 216 |
msgid "" |
| 217 |
"Create the shared memory object if it does not exist. The user and group " |
| 218 |
"ownership of the object are taken from the corresponding effective IDs of " |
| 219 |
"the calling process, and the object's permission bits are set according to " |
| 220 |
"the low-order 9 bits of I<mode>, except that those bits set in the process " |
| 221 |
"file mode creation mask (see B<umask>(2)) are cleared for the new object. " |
| 222 |
"A set of macro constants which can be used to define I<mode> is listed in " |
| 223 |
"B<open>(2). (Symbolic definitions of these constants can be obtained by " |
| 224 |
"including I<E<lt>sys/stat.hE<gt>>.)" |
| 225 |
msgstr "" |
| 226 |
"Créer l'objet en mémoire partagée s'il n'existe pas. L'utilisateur et le " |
| 227 |
"groupe propriétaires de l'objet proviennent des ID effectifs du processus " |
| 228 |
"appelant, et les bits de permission sont définis en fonction des 9\\ bits de " |
| 229 |
"poids faible de I<mode>, excepté que les bits qui sont définis dans le " |
| 230 |
"masque de mode de fichier pour la création du processus (consultez " |
| 231 |
"B<umask>(2)) sont effacés pour le nouvel objet. Un jeu de constantes de " |
| 232 |
"macroutilisables pour définir le I<mode> est décrit dans B<open>(2) (les " |
| 233 |
"définitions symboliques de ces constantes peuvent être obtenues en incluant " |
| 234 |
"I<E<lt>sys/stat.hE<gt>>)." |
| 235 |
|
| 236 |
#. type: Plain text |
| 237 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 238 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 239 |
msgid "" |
| 240 |
"A new shared memory object initially has zero length\\[em]the size of the " |
| 241 |
"object can be set using B<ftruncate>(2). The newly allocated bytes of a " |
| 242 |
"shared memory object are automatically initialized to 0." |
| 243 |
msgstr "" |
| 244 |
"Un nouvel objet en mémoire partagée a une taille initiale nulle — elle peut " |
| 245 |
"être définie avec B<ftruncate>(2). Les octets d'un objet en mémoire partagée " |
| 246 |
"nouvellement créé sont automatiquement initialisés à zéro." |
| 247 |
|
| 248 |
#. type: TP |
| 249 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 250 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 251 |
#, no-wrap |
| 252 |
msgid "B<O_EXCL>" |
| 253 |
msgstr "B<O_EXCL>" |
| 254 |
|
| 255 |
#. type: Plain text |
| 256 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 257 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 258 |
msgid "" |
| 259 |
"If B<O_CREAT> was also specified, and a shared memory object with the given " |
| 260 |
"I<name> already exists, return an error. The check for the existence of the " |
| 261 |
"object, and its creation if it does not exist, are performed atomically." |
| 262 |
msgstr "" |
| 263 |
"Si B<O_CREAT> était aussi précisé et si un objet en mémoire partagée avec le " |
| 264 |
"même I<nom> existait déjà, renvoyer une erreur. La vérification de " |
| 265 |
"l'existence de l'objet et sa création s'il n'existe pas sont réalisées de " |
| 266 |
"manière atomique." |
| 267 |
|
| 268 |
#. type: TP |
| 269 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 270 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 271 |
#, no-wrap |
| 272 |
msgid "B<O_TRUNC>" |
| 273 |
msgstr "B<O_TRUNC>" |
| 274 |
|
| 275 |
#. type: Plain text |
| 276 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 277 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 278 |
msgid "If the shared memory object already exists, truncate it to zero bytes." |
| 279 |
msgstr "Si l'objet en mémoire partagée existe déjà, tronquer sa taille à zéro." |
| 280 |
|
| 281 |
#. type: Plain text |
| 282 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 283 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 284 |
msgid "" |
| 285 |
"Definitions of these flag values can be obtained by including " |
| 286 |
"I<E<lt>fcntl.hE<gt>>." |
| 287 |
msgstr "" |
| 288 |
"Les définitions des valeurs de ces attributs peuvent être obtenues en " |
| 289 |
"incluant I<E<lt>fcntl.hE<gt>>." |
| 290 |
|
| 291 |
#. type: Plain text |
| 292 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 293 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 294 |
msgid "" |
| 295 |
"On successful completion B<shm_open>() returns a new file descriptor " |
| 296 |
"referring to the shared memory object. This file descriptor is guaranteed " |
| 297 |
"to be the lowest-numbered file descriptor not previously opened within the " |
| 298 |
"process. The B<FD_CLOEXEC> flag (see B<fcntl>(2)) is set for the file " |
| 299 |
"descriptor." |
| 300 |
msgstr "" |
| 301 |
"Si elle réussit, la fonction B<shm_open>() renvoie un nouveau descripteur de " |
| 302 |
"fichierréférençant l'objet en mémoire partagée. Ce descripteur sera le plus " |
| 303 |
"petit numéro disponible dans la table des descripteurs du processus. " |
| 304 |
"L'attribut B<FD_CLOEXEC> (consultez B<fcntl>(2)) sera activé pour le " |
| 305 |
"descripteur de fichier." |
| 306 |
|
| 307 |
#. type: Plain text |
| 308 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 309 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 310 |
msgid "" |
| 311 |
"The file descriptor is normally used in subsequent calls to B<ftruncate>(2) " |
| 312 |
"(for a newly created object) and B<mmap>(2). After a call to B<mmap>(2) " |
| 313 |
"the file descriptor may be closed without affecting the memory mapping." |
| 314 |
msgstr "" |
| 315 |
"Le descripteur de fichier est utilisé normalement pour les appels ultérieurs " |
| 316 |
"à B<ftruncate>(2) (pour un objet nouvellement créé) et B<mmap>(2). Après un " |
| 317 |
"appel à B<mmap>(2) le descripteur peut être fermé sans affecter la " |
| 318 |
"projection mémoire." |
| 319 |
|
| 320 |
#. type: Plain text |
| 321 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 322 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 323 |
msgid "" |
| 324 |
"The operation of B<shm_unlink>() is analogous to B<unlink>(2): it removes a " |
| 325 |
"shared memory object name, and, once all processes have unmapped the object, " |
| 326 |
"deallocates and destroys the contents of the associated memory region. " |
| 327 |
"After a successful B<shm_unlink>(), attempts to B<shm_open>() an object " |
| 328 |
"with the same I<name> fail (unless B<O_CREAT> was specified, in which case a " |
| 329 |
"new, distinct object is created)." |
| 330 |
msgstr "" |
| 331 |
"Le fonctionnement de B<shm_unlink>() est analogue à celui de " |
| 332 |
"B<unlink>(2)\\ : il supprime le nom d'un objet en mémoire partagée, et, une " |
| 333 |
"fois que tous les processus ont supprimé leur projection en mémoire, libère " |
| 334 |
"et détruit le contenu de la portion de mémoire associée. Après un appel " |
| 335 |
"réussi à B<shm_unlink>(), les tentatives d'appeler B<shm_open>() avec le " |
| 336 |
"même I<nom> échoueront (sauf si B<O_CREAT> est spécifié, auquel cas un " |
| 337 |
"nouvel objet distinct sera créé)." |
| 338 |
|
| 339 |
#. type: SH |
| 340 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 341 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 342 |
#, no-wrap |
| 343 |
msgid "RETURN VALUE" |
| 344 |
msgstr "VALEUR RENVOYÉE" |
| 345 |
|
| 346 |
#. type: Plain text |
| 347 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 348 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 349 |
msgid "" |
| 350 |
"On success, B<shm_open>() returns a file descriptor (a nonnegative " |
| 351 |
"integer). On success, B<shm_unlink>() returns 0. On failure, both " |
| 352 |
"functions return -1 and set I<errno> to indicate the error." |
| 353 |
msgstr "" |
| 354 |
"Si elles réussissent, B<shm_open>() renvoie un descripteur de fichier (un " |
| 355 |
"entier non négatif) et B<shm_unlink>() renvoie B<0>. En cas d'échec, les " |
| 356 |
"deux fonctions renvoient B<-1> et définissent I<errno> pour indiquer " |
| 357 |
"l'erreur." |
| 358 |
|
| 359 |
#. type: SH |
| 360 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 361 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 362 |
#, no-wrap |
| 363 |
msgid "ERRORS" |
| 364 |
msgstr "ERREURS" |
| 365 |
|
| 366 |
#. type: TP |
| 367 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 368 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 369 |
#, no-wrap |
| 370 |
msgid "B<EACCES>" |
| 371 |
msgstr "B<EACCES>" |
| 372 |
|
| 373 |
#. type: Plain text |
| 374 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 375 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 376 |
msgid "Permission to B<shm_unlink>() the shared memory object was denied." |
| 377 |
msgstr "" |
| 378 |
"La permission d'utiliser B<shm_unlink>() sur l'objet en mémoire partagée a " |
| 379 |
"été refusée." |
| 380 |
|
| 381 |
#. type: Plain text |
| 382 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 383 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 384 |
msgid "" |
| 385 |
"Permission was denied to B<shm_open>() I<name> in the specified I<mode>, or " |
| 386 |
"B<O_TRUNC> was specified and the caller does not have write permission on " |
| 387 |
"the object." |
| 388 |
msgstr "" |
| 389 |
"L'utilisation de B<shm_open>() pour ouvrir l'objet I<nom> dans le I<mode> " |
| 390 |
"spécifié a été refusée, ou B<O_TRUNC> a été spécifié et l'appelant n'a pas " |
| 391 |
"les permissions d'écriture sur l'objet." |
| 392 |
|
| 393 |
#. type: TP |
| 394 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 395 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 396 |
#, no-wrap |
| 397 |
msgid "B<EEXIST>" |
| 398 |
msgstr "B<EEXIST>" |
| 399 |
|
| 400 |
#. type: Plain text |
| 401 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 402 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 403 |
msgid "" |
| 404 |
"Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>() and the " |
| 405 |
"shared memory object specified by I<name> already exists." |
| 406 |
msgstr "" |
| 407 |
"B<O_CREAT> et B<O_EXCL> ont été spécifiés dans B<shm_open>() et un objet de " |
| 408 |
"mémoire partagée du même I<nom> existe déjà." |
| 409 |
|
| 410 |
#. type: TP |
| 411 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 412 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 413 |
#, no-wrap |
| 414 |
msgid "B<EINVAL>" |
| 415 |
msgstr "B<EINVAL>" |
| 416 |
|
| 417 |
#. type: Plain text |
| 418 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 419 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 420 |
msgid "The I<name> argument to B<shm_open>() was invalid." |
| 421 |
msgstr "L'argument I<nom> de B<shm_open>() n'était pas valable." |
| 422 |
|
| 423 |
#. type: TP |
| 424 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 425 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 426 |
#, no-wrap |
| 427 |
msgid "B<EMFILE>" |
| 428 |
msgstr "B<EMFILE>" |
| 429 |
|
| 430 |
#. type: Plain text |
| 431 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 432 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 433 |
msgid "" |
| 434 |
"The per-process limit on the number of open file descriptors has been " |
| 435 |
"reached." |
| 436 |
msgstr "" |
| 437 |
"La limite du nombre de descripteurs de fichiers par processus a été atteinte." |
| 438 |
|
| 439 |
#. type: TP |
| 440 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 441 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 442 |
#, no-wrap |
| 443 |
msgid "B<ENAMETOOLONG>" |
| 444 |
msgstr "B<ENAMETOOLONG>" |
| 445 |
|
| 446 |
#. type: Plain text |
| 447 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 448 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 449 |
msgid "The length of I<name> exceeds B<PATH_MAX>." |
| 450 |
msgstr "La longueur du I<nom> dépasse B<PATH_MAX>." |
| 451 |
|
| 452 |
#. type: TP |
| 453 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 454 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 455 |
#, no-wrap |
| 456 |
msgid "B<ENFILE>" |
| 457 |
msgstr "B<ENFILE>" |
| 458 |
|
| 459 |
#. type: Plain text |
| 460 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 461 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 462 |
msgid "" |
| 463 |
"The system-wide limit on the total number of open files has been reached." |
| 464 |
msgstr "" |
| 465 |
"La limite du nombre total de fichiers ouverts pour le système entier a été " |
| 466 |
"atteinte." |
| 467 |
|
| 468 |
#. type: TP |
| 469 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 470 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 471 |
#, no-wrap |
| 472 |
msgid "B<ENOENT>" |
| 473 |
msgstr "B<ENOENT>" |
| 474 |
|
| 475 |
#. type: Plain text |
| 476 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 477 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 478 |
msgid "" |
| 479 |
"An attempt was made to B<shm_open>() a I<name> that did not exist, and " |
| 480 |
"B<O_CREAT> was not specified." |
| 481 |
msgstr "" |
| 482 |
"Tentative d'ouvrir avec B<shm_open>() un objet I<nom> qui n'existe pas, " |
| 483 |
"alors que l'attribut B<O_CREAT> n'a pas été spécifié." |
| 484 |
|
| 485 |
#. type: Plain text |
| 486 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 487 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 488 |
msgid "" |
| 489 |
"An attempt was to made to B<shm_unlink>() a I<name> that does not exist." |
| 490 |
msgstr "" |
| 491 |
"Tentative d'utiliser B<shm_unlink>() sur un objet I<nom> qui n'existe pas." |
| 492 |
|
| 493 |
#. type: SH |
| 494 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 495 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 496 |
#, no-wrap |
| 497 |
msgid "ATTRIBUTES" |
| 498 |
msgstr "ATTRIBUTS" |
| 499 |
|
| 500 |
#. type: Plain text |
| 501 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 502 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 503 |
msgid "" |
| 504 |
"For an explanation of the terms used in this section, see B<attributes>(7)." |
| 505 |
msgstr "" |
| 506 |
"Pour une explication des termes utilisés dans cette section, consulter " |
| 507 |
"B<attributes>(7)." |
| 508 |
|
| 509 |
#. type: tbl table |
| 510 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 511 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 512 |
#, no-wrap |
| 513 |
msgid "Interface" |
| 514 |
msgstr "Interface" |
| 515 |
|
| 516 |
#. type: tbl table |
| 517 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 518 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 519 |
#, no-wrap |
| 520 |
msgid "Attribute" |
| 521 |
msgstr "Attribut" |
| 522 |
|
| 523 |
#. type: tbl table |
| 524 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 525 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 526 |
#, no-wrap |
| 527 |
msgid "Value" |
| 528 |
msgstr "Valeur" |
| 529 |
|
| 530 |
#. type: tbl table |
| 531 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 532 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 533 |
#, no-wrap |
| 534 |
msgid ".na\n" |
| 535 |
msgstr ".na\n" |
| 536 |
|
| 537 |
#. type: tbl table |
| 538 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 539 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 540 |
#, no-wrap |
| 541 |
msgid ".nh\n" |
| 542 |
msgstr ".nh\n" |
| 543 |
|
| 544 |
#. type: tbl table |
| 545 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 546 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 547 |
#, no-wrap |
| 548 |
msgid "" |
| 549 |
"B<shm_open>(),\n" |
| 550 |
"B<shm_unlink>()" |
| 551 |
msgstr "" |
| 552 |
"B<shm_open>(),\n" |
| 553 |
"B<shm_unlink>()" |
| 554 |
|
| 555 |
#. type: tbl table |
| 556 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 557 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 558 |
#, no-wrap |
| 559 |
msgid "Thread safety" |
| 560 |
msgstr "Sécurité des threads" |
| 561 |
|
| 562 |
#. type: tbl table |
| 563 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 564 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 565 |
#, no-wrap |
| 566 |
msgid "MT-Safe locale" |
| 567 |
msgstr "MT-Safe locale" |
| 568 |
|
| 569 |
#. type: SH |
| 570 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 571 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 572 |
#, no-wrap |
| 573 |
msgid "VERSIONS" |
| 574 |
msgstr "VERSIONS" |
| 575 |
|
| 576 |
#. type: Plain text |
| 577 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 578 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 579 |
msgid "" |
| 580 |
"POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> " |
| 581 |
"unspecified. On Linux, this will successfully truncate an existing shared " |
| 582 |
"memory object\\[em]this may not be so on other UNIX systems." |
| 583 |
msgstr "" |
| 584 |
"POSIX ne précise pas le comportement de la combinaison B<O_RDONLY> et " |
| 585 |
"B<O_TRUNC>. Sous Linux, la troncature aura lieu — cela n'est pas " |
| 586 |
"nécessairement le cas sous d'autres systèmes UNIX." |
| 587 |
|
| 588 |
#. type: Plain text |
| 589 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 590 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 591 |
msgid "" |
| 592 |
"The POSIX shared memory object implementation on Linux makes use of a " |
| 593 |
"dedicated B<tmpfs>(5) filesystem that is normally mounted under I</dev/shm>." |
| 594 |
msgstr "" |
| 595 |
"L'implémentation sous Linux des objets de mémoire partagée POSIX utilise un " |
| 596 |
"système de fichiers B<tmpfs>(5) dédié, monté en principe sous I</dev/shm>." |
| 597 |
|
| 598 |
#. type: SH |
| 599 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 600 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 601 |
#, no-wrap |
| 602 |
msgid "STANDARDS" |
| 603 |
msgstr "NORMES" |
| 604 |
|
| 605 |
#. type: Plain text |
| 606 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 607 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 608 |
msgid "POSIX.1-2008." |
| 609 |
msgstr "POSIX.1-2008." |
| 610 |
|
| 611 |
#. type: SH |
| 612 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 613 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 614 |
#, no-wrap |
| 615 |
msgid "HISTORY" |
| 616 |
msgstr "HISTORIQUE" |
| 617 |
|
| 618 |
#. type: Plain text |
| 619 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 620 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 621 |
msgid "glibc 2.2. POSIX.1-2001." |
| 622 |
msgstr "glibc 2.2. POSIX.1-2001." |
| 623 |
|
| 624 |
#. type: Plain text |
| 625 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 626 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 627 |
msgid "" |
| 628 |
"POSIX.1-2001 says that the group ownership of a newly created shared memory " |
| 629 |
"object is set to either the calling process's effective group ID or \"a " |
| 630 |
"system default group ID\". POSIX.1-2008 says that the group ownership may " |
| 631 |
"be set to either the calling process's effective group ID or, if the object " |
| 632 |
"is visible in the filesystem, the group ID of the parent directory." |
| 633 |
msgstr "" |
| 634 |
"POSIX.1-2001 indique que le groupe propriétaire d'un objet en mémoire " |
| 635 |
"partagée nouvellement créé utilise soit l'ID de groupe du processus " |
| 636 |
"appelant, soit un «\\ ID de groupe par défaut défini par le système\\ ». " |
| 637 |
"POSIX.1-2008 indique que le groupe propriétaire peut être défini soit avec " |
| 638 |
"l'ID de groupe du processus appelant, soit, si l'objet est visible dans le " |
| 639 |
"système de fichiers, avec l'ID de groupe du répertoire parent." |
| 640 |
|
| 641 |
#. type: SH |
| 642 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 643 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 644 |
#, no-wrap |
| 645 |
msgid "EXAMPLES" |
| 646 |
msgstr "EXEMPLES" |
| 647 |
|
| 648 |
#. type: Plain text |
| 649 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 650 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 651 |
msgid "" |
| 652 |
"The programs below employ POSIX shared memory and POSIX unnamed semaphores " |
| 653 |
"to exchange a piece of data. The \"bounce\" program (which must be run " |
| 654 |
"first) raises the case of a string that is placed into the shared memory by " |
| 655 |
"the \"send\" program. Once the data has been modified, the \"send\" program " |
| 656 |
"then prints the contents of the modified shared memory. An example " |
| 657 |
"execution of the two programs is the following:" |
| 658 |
msgstr "" |
| 659 |
"Les programmes ci-dessous utilisent la mémoire partagée POSIX et des " |
| 660 |
"sémaphores non nommés POSIX pour échanger des données. Le programme " |
| 661 |
"« bounce » (qui doit être exécuté en premier) illustre le cas d'une chaîne " |
| 662 |
"placée en mémoire partagée par le programme « send ». Lorsque les données " |
| 663 |
"ont été modifiées, le programme « send » affiche le contenu de la mémoire " |
| 664 |
"partagée modifié. Voici un exemple d'exécution des deux programmes :" |
| 665 |
|
| 666 |
#. type: Plain text |
| 667 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 668 |
#: opensuse-tumbleweed |
| 669 |
#, fuzzy, no-wrap |
| 670 |
#| msgid "" |
| 671 |
#| "$ B<./pshm_ucase_bounce /myshm &>\n" |
| 672 |
#| "[1] 270171\n" |
| 673 |
#| "$ B<./pshm_ucase_send /myshm hello>\n" |
| 674 |
#| "HELLO\n" |
| 675 |
msgid "" |
| 676 |
"$B< ./pshm_ucase_bounce /myshm &>\n" |
| 677 |
"[1] 270171\n" |
| 678 |
"$B< ./pshm_ucase_send /myshm hello>;\n" |
| 679 |
"HELLO\n" |
| 680 |
msgstr "" |
| 681 |
"$ B<./pshm_ucase_bounce /myshm &>\n" |
| 682 |
"[1] 270171\n" |
| 683 |
"$ B<./pshm_ucase_send /myshm bonjour>\n" |
| 684 |
"BONJOUR\n" |
| 685 |
|
| 686 |
#. type: Plain text |
| 687 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 688 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 689 |
msgid "Further detail about these programs is provided below." |
| 690 |
msgstr "Vous trouverez plus de détails à propos de ces programmes ci-dessous." |
| 691 |
|
| 692 |
#. type: SS |
| 693 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 694 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 695 |
#, no-wrap |
| 696 |
msgid "Program source: pshm_ucase.h" |
| 697 |
msgstr "Source du programme : pshm_ucase.h" |
| 698 |
|
| 699 |
#. type: Plain text |
| 700 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 701 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 702 |
msgid "" |
| 703 |
"The following header file is included by both programs below. Its primary " |
| 704 |
"purpose is to define a structure that will be imposed on the memory object " |
| 705 |
"that is shared between the two programs." |
| 706 |
msgstr "" |
| 707 |
"Ce fichier d'en-tête est inclus par les deux programmes ci-dessous. Sa " |
| 708 |
"principale fonction consiste à définir une structure qui sera imposée à " |
| 709 |
"l'objet en mémoire partagé entre les deux programmes." |
| 710 |
|
| 711 |
#. type: Plain text |
| 712 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 713 |
#: opensuse-tumbleweed |
| 714 |
#, no-wrap |
| 715 |
msgid "" |
| 716 |
"#ifndef PSHM_UCASE_H\n" |
| 717 |
"#define PSHM_UCASE_H\n" |
| 718 |
"\\&\n" |
| 719 |
"#include E<lt>err.hE<gt>\n" |
| 720 |
"#include E<lt>semaphore.hE<gt>\n" |
| 721 |
"#include E<lt>stddef.hE<gt>\n" |
| 722 |
"#include E<lt>stdio.hE<gt>\n" |
| 723 |
"#include E<lt>stdlib.hE<gt>\n" |
| 724 |
"\\&\n" |
| 725 |
"#define BUF_SIZE 1024 /* Maximum size for exchanged string */\n" |
| 726 |
"\\&\n" |
| 727 |
"/* Define a structure that will be imposed on the shared\n" |
| 728 |
" memory object */\n" |
| 729 |
"\\&\n" |
| 730 |
"struct shmbuf {\n" |
| 731 |
" sem_t sem1; /* POSIX unnamed semaphore */\n" |
| 732 |
" sem_t sem2; /* POSIX unnamed semaphore */\n" |
| 733 |
" size_t cnt; /* Number of bytes used in \\[aq]buf\\[aq] */\n" |
| 734 |
" char buf[BUF_SIZE]; /* Data being transferred */\n" |
| 735 |
"};\n" |
| 736 |
"\\&\n" |
| 737 |
"#endif // include guard\n" |
| 738 |
msgstr "" |
| 739 |
|
| 740 |
#. type: SS |
| 741 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 742 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 743 |
#, no-wrap |
| 744 |
msgid "Program source: pshm_ucase_bounce.c" |
| 745 |
msgstr "Source programme : pshm_ucase_bounce.c" |
| 746 |
|
| 747 |
#. type: Plain text |
| 748 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 749 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 750 |
msgid "" |
| 751 |
"The \"bounce\" program creates a new shared memory object with the name " |
| 752 |
"given in its command-line argument and sizes the object to match the size of " |
| 753 |
"the I<shmbuf> structure defined in the header file. It then maps the object " |
| 754 |
"into the process's address space, and initializes two POSIX semaphores " |
| 755 |
"inside the object to 0." |
| 756 |
msgstr "" |
| 757 |
"Le programme « bounce » crée un nouvel objet en mémoire partagée avec le nom " |
| 758 |
"spécifié comme argument de la ligne de commande et le dimensionne de manière " |
| 759 |
"à correspondre à la taille de la structure I<shmbuf> définie dans le fichier " |
| 760 |
"d'en-tête. Il projette ensuite l'objet dans l'espace d'adressage du " |
| 761 |
"processus et initialise deux sémaphores POSIX à B<0> à l'intérieur de " |
| 762 |
"l'objet." |
| 763 |
|
| 764 |
#. type: Plain text |
| 765 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 766 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 767 |
msgid "" |
| 768 |
"After the \"send\" program has posted the first of the semaphores, the " |
| 769 |
"\"bounce\" program upper cases the data that has been placed in the memory " |
| 770 |
"by the \"send\" program and then posts the second semaphore to tell the " |
| 771 |
"\"send\" program that it may now access the shared memory." |
| 772 |
msgstr "" |
| 773 |
"Une fois le premier sémaphore posté par le programme « send », le programme " |
| 774 |
"« bounce » met en capitales les données placées en mémoire par le programme " |
| 775 |
"« send », puis poste le second sémaphore pour indiquer au programme « send » " |
| 776 |
"qu'il peut maintenant accéder à la mémoire partagée." |
| 777 |
|
| 778 |
#. type: Plain text |
| 779 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 780 |
#: opensuse-tumbleweed |
| 781 |
#, no-wrap |
| 782 |
msgid "" |
| 783 |
"/* pshm_ucase_bounce.c\n" |
| 784 |
"\\&\n" |
| 785 |
" Licensed under GNU General Public License v2 or later.\n" |
| 786 |
"*/\n" |
| 787 |
"#include E<lt>ctype.hE<gt>\n" |
| 788 |
"#include E<lt>fcntl.hE<gt>\n" |
| 789 |
"#include E<lt>stdio.hE<gt>\n" |
| 790 |
"#include E<lt>stdlib.hE<gt>\n" |
| 791 |
"#include E<lt>sys/mman.hE<gt>\n" |
| 792 |
"#include E<lt>unistd.hE<gt>\n" |
| 793 |
"\\&\n" |
| 794 |
"#include \"pshm_ucase.h\"\n" |
| 795 |
"\\&\n" |
| 796 |
"int\n" |
| 797 |
"main(int argc, char *argv[])\n" |
| 798 |
"{\n" |
| 799 |
" int fd;\n" |
| 800 |
" char *shmpath;\n" |
| 801 |
" struct shmbuf *shmp;\n" |
| 802 |
"\\&\n" |
| 803 |
" if (argc != 2) {\n" |
| 804 |
" fprintf(stderr, \"Usage: %s /shm-path\\[rs]n\", argv[0]);\n" |
| 805 |
" exit(EXIT_FAILURE);\n" |
| 806 |
" }\n" |
| 807 |
"\\&\n" |
| 808 |
" shmpath = argv[1];\n" |
| 809 |
"\\&\n" |
| 810 |
" /* Create shared memory object and set its size to the size\n" |
| 811 |
" of our structure. */\n" |
| 812 |
"\\&\n" |
| 813 |
" fd = shm_open(shmpath, O_CREAT | O_EXCL | O_RDWR, 0600);\n" |
| 814 |
" if (fd == -1)\n" |
| 815 |
" err(EXIT_FAILURE, \"shm_open\");\n" |
| 816 |
"\\&\n" |
| 817 |
" if (ftruncate(fd, sizeof(struct shmbuf)) == -1)\n" |
| 818 |
" err(EXIT_FAILURE, \"ftruncate\");\n" |
| 819 |
"\\&\n" |
| 820 |
" /* Map the object into the caller\\[aq]s address space. */\n" |
| 821 |
"\\&\n" |
| 822 |
" shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,\n" |
| 823 |
" MAP_SHARED, fd, 0);\n" |
| 824 |
" if (shmp == MAP_FAILED)\n" |
| 825 |
" err(EXIT_FAILURE, \"mmap\");\n" |
| 826 |
"\\&\n" |
| 827 |
" /* Initialize semaphores as process-shared, with value 0. */\n" |
| 828 |
"\\&\n" |
| 829 |
" if (sem_init(&shmp-E<gt>sem1, 1, 0) == -1)\n" |
| 830 |
" err(EXIT_FAILURE, \"sem_init-sem1\");\n" |
| 831 |
" if (sem_init(&shmp-E<gt>sem2, 1, 0) == -1)\n" |
| 832 |
" err(EXIT_FAILURE, \"sem_init-sem2\");\n" |
| 833 |
"\\&\n" |
| 834 |
" /* Wait for \\[aq]sem1\\[aq] to be posted by peer before touching\n" |
| 835 |
" shared memory. */\n" |
| 836 |
"\\&\n" |
| 837 |
" if (sem_wait(&shmp-E<gt>sem1) == -1)\n" |
| 838 |
" err(EXIT_FAILURE, \"sem_wait\");\n" |
| 839 |
"\\&\n" |
| 840 |
" /* Convert data in shared memory into upper case. */\n" |
| 841 |
"\\&\n" |
| 842 |
" for (size_t j = 0; j E<lt> shmp-E<gt>cnt; j++)\n" |
| 843 |
" shmp-E<gt>buf[j] = toupper((unsigned char) shmp-E<gt>buf[j]);\n" |
| 844 |
"\\&\n" |
| 845 |
" /* Post \\[aq]sem2\\[aq] to tell the peer that it can now\n" |
| 846 |
" access the modified data in shared memory. */\n" |
| 847 |
"\\&\n" |
| 848 |
" if (sem_post(&shmp-E<gt>sem2) == -1)\n" |
| 849 |
" err(EXIT_FAILURE, \"sem_post\");\n" |
| 850 |
"\\&\n" |
| 851 |
" /* Unlink the shared memory object. Even if the peer process\n" |
| 852 |
" is still using the object, this is okay. The object will\n" |
| 853 |
" be removed only after all open references are closed. */\n" |
| 854 |
"\\&\n" |
| 855 |
" shm_unlink(shmpath);\n" |
| 856 |
"\\&\n" |
| 857 |
" exit(EXIT_SUCCESS);\n" |
| 858 |
"}\n" |
| 859 |
msgstr "" |
| 860 |
|
| 861 |
#. type: SS |
| 862 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 863 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 864 |
#, no-wrap |
| 865 |
msgid "Program source: pshm_ucase_send.c" |
| 866 |
msgstr "Source du programme : pshm_ucase_send.c" |
| 867 |
|
| 868 |
#. type: Plain text |
| 869 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 870 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 871 |
msgid "" |
| 872 |
"The \"send\" program takes two command-line arguments: the pathname of a " |
| 873 |
"shared memory object previously created by the \"bounce\" program and a " |
| 874 |
"string that is to be copied into that object." |
| 875 |
msgstr "" |
| 876 |
"Le programme « send » accepte deux arguments de ligne de commande : le nom " |
| 877 |
"d'un objet en mémoire partagée préalablement créé par le programme " |
| 878 |
"« bounce » et une chaîne à copier dans cet objet." |
| 879 |
|
| 880 |
#. type: Plain text |
| 881 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 882 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 883 |
msgid "" |
| 884 |
"The program opens the shared memory object and maps the object into its " |
| 885 |
"address space. It then copies the data specified in its second argument " |
| 886 |
"into the shared memory, and posts the first semaphore, which tells the " |
| 887 |
"\"bounce\" program that it can now access that data. After the \"bounce\" " |
| 888 |
"program posts the second semaphore, the \"send\" program prints the contents " |
| 889 |
"of the shared memory on standard output." |
| 890 |
msgstr "" |
| 891 |
"Le programme ouvre l'objet en mémoire partagée et le projette dans son " |
| 892 |
"espace d'adressage. Ensuite, il copie les données spécifiées à l'aide du " |
| 893 |
"second argument vers la mémoire partagée et poste le premier sémaphore pour " |
| 894 |
"informer le programme « bounce » qu'il peut maintenant accéder aux données. " |
| 895 |
"Lorsque le programme « bounce » a posté le second sémaphore, le programme " |
| 896 |
"« send » affiche le contenu de la mémoire partagée sur la sortie standard." |
| 897 |
|
| 898 |
#. type: Plain text |
| 899 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 900 |
#: opensuse-tumbleweed |
| 901 |
#, no-wrap |
| 902 |
msgid "" |
| 903 |
"/* pshm_ucase_send.c\n" |
| 904 |
"\\&\n" |
| 905 |
" Licensed under GNU General Public License v2 or later.\n" |
| 906 |
"*/\n" |
| 907 |
"#include E<lt>fcntl.hE<gt>\n" |
| 908 |
"#include E<lt>stddef.hE<gt>\n" |
| 909 |
"#include E<lt>stdio.hE<gt>\n" |
| 910 |
"#include E<lt>stdlib.hE<gt>\n" |
| 911 |
"#include E<lt>string.hE<gt>\n" |
| 912 |
"#include E<lt>sys/mman.hE<gt>\n" |
| 913 |
"#include E<lt>unistd.hE<gt>\n" |
| 914 |
"\\&\n" |
| 915 |
"#include \"pshm_ucase.h\"\n" |
| 916 |
"\\&\n" |
| 917 |
"int\n" |
| 918 |
"main(int argc, char *argv[])\n" |
| 919 |
"{\n" |
| 920 |
" int fd;\n" |
| 921 |
" char *shmpath, *string;\n" |
| 922 |
" size_t len;\n" |
| 923 |
" struct shmbuf *shmp;\n" |
| 924 |
"\\&\n" |
| 925 |
" if (argc != 3) {\n" |
| 926 |
" fprintf(stderr, \"Usage: %s /shm-path string\\[rs]n\", argv[0]);\n" |
| 927 |
" exit(EXIT_FAILURE);\n" |
| 928 |
" }\n" |
| 929 |
"\\&\n" |
| 930 |
" shmpath = argv[1];\n" |
| 931 |
" string = argv[2];\n" |
| 932 |
" len = strlen(string);\n" |
| 933 |
"\\&\n" |
| 934 |
" if (len E<gt> BUF_SIZE) {\n" |
| 935 |
" fprintf(stderr, \"String is too long\\[rs]n\");\n" |
| 936 |
" exit(EXIT_FAILURE);\n" |
| 937 |
" }\n" |
| 938 |
"\\&\n" |
| 939 |
" /* Open the existing shared memory object and map it\n" |
| 940 |
" into the caller\\[aq]s address space. */\n" |
| 941 |
"\\&\n" |
| 942 |
" fd = shm_open(shmpath, O_RDWR, 0);\n" |
| 943 |
" if (fd == -1)\n" |
| 944 |
" err(EXIT_FAILURE, \"shm_open\");\n" |
| 945 |
"\\&\n" |
| 946 |
" shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,\n" |
| 947 |
" MAP_SHARED, fd, 0);\n" |
| 948 |
" if (shmp == MAP_FAILED)\n" |
| 949 |
" err(EXIT_FAILURE, \"mmap\");\n" |
| 950 |
"\\&\n" |
| 951 |
" /* Copy data into the shared memory object. */\n" |
| 952 |
"\\&\n" |
| 953 |
" shmp-E<gt>cnt = len;\n" |
| 954 |
" memcpy(&shmp-E<gt>buf, string, len);\n" |
| 955 |
"\\&\n" |
| 956 |
" /* Tell peer that it can now access shared memory. */\n" |
| 957 |
"\\&\n" |
| 958 |
" if (sem_post(&shmp-E<gt>sem1) == -1)\n" |
| 959 |
" err(EXIT_FAILURE, \"sem_post\");\n" |
| 960 |
"\\&\n" |
| 961 |
" /* Wait until peer says that it has finished accessing\n" |
| 962 |
" the shared memory. */\n" |
| 963 |
"\\&\n" |
| 964 |
" if (sem_wait(&shmp-E<gt>sem2) == -1)\n" |
| 965 |
" err(EXIT_FAILURE, \"sem_wait\");\n" |
| 966 |
"\\&\n" |
| 967 |
" /* Write modified data in shared memory to standard output. */\n" |
| 968 |
"\\&\n" |
| 969 |
" if (write(STDOUT_FILENO, &shmp-E<gt>buf, len) == -1)\n" |
| 970 |
" err(EXIT_FAILURE, \"write\");\n" |
| 971 |
" if (write(STDOUT_FILENO, \"\\[rs]n\", 1) == -1)\n" |
| 972 |
" err(EXIT_FAILURE, \"write\");\n" |
| 973 |
"\\&\n" |
| 974 |
" exit(EXIT_SUCCESS);\n" |
| 975 |
"}\n" |
| 976 |
msgstr "" |
| 977 |
|
| 978 |
#. type: SH |
| 979 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 980 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 981 |
#, no-wrap |
| 982 |
msgid "SEE ALSO" |
| 983 |
msgstr "VOIR AUSSI" |
| 984 |
|
| 985 |
#. type: Plain text |
| 986 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 987 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 988 |
msgid "" |
| 989 |
"B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), " |
| 990 |
"B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), " |
| 991 |
"B<shm_overview>(7)" |
| 992 |
msgstr "" |
| 993 |
"B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), " |
| 994 |
"B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), " |
| 995 |
"B<shm_overview>(7)" |
| 996 |
|
| 997 |
#. type: TH |
| 998 |
#: debian-trixie |
| 999 |
#, no-wrap |
| 1000 |
msgid "2024-06-15" |
| 1001 |
msgstr "15 juin 2024" |
| 1002 |
|
| 1003 |
#. type: TH |
| 1004 |
#: debian-trixie |
| 1005 |
#, no-wrap |
| 1006 |
msgid "Linux man-pages 6.9.1" |
| 1007 |
msgstr "Pages du manuel de Linux 6.9.1" |
| 1008 |
|
| 1009 |
#. type: Plain text |
| 1010 |
#: debian-trixie |
| 1011 |
msgid "Real-time library (I<librt>, I<-lrt>)" |
| 1012 |
msgstr "Bibliothèque de temps réel (I<librt>, I<-lrt>)" |
| 1013 |
|
| 1014 |
#. type: Plain text |
| 1015 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1016 |
#, no-wrap |
| 1017 |
msgid "" |
| 1018 |
"$ B<./pshm_ucase_bounce /myshm &>\n" |
| 1019 |
"[1] 270171\n" |
| 1020 |
"$ B<./pshm_ucase_send /myshm hello>\n" |
| 1021 |
"HELLO\n" |
| 1022 |
msgstr "" |
| 1023 |
"$ B<./pshm_ucase_bounce /myshm &>\n" |
| 1024 |
"[1] 270171\n" |
| 1025 |
"$ B<./pshm_ucase_send /myshm bonjour>\n" |
| 1026 |
"BONJOUR\n" |
| 1027 |
|
| 1028 |
#. type: Plain text |
| 1029 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1030 |
#, no-wrap |
| 1031 |
msgid "" |
| 1032 |
"#ifndef PSHM_UCASE_H\n" |
| 1033 |
"#define PSHM_UCASE_H\n" |
| 1034 |
"\\&\n" |
| 1035 |
"#include E<lt>semaphore.hE<gt>\n" |
| 1036 |
"#include E<lt>stddef.hE<gt>\n" |
| 1037 |
"#include E<lt>stdio.hE<gt>\n" |
| 1038 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1039 |
"\\&\n" |
| 1040 |
"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n" |
| 1041 |
" } while (0)\n" |
| 1042 |
"\\&\n" |
| 1043 |
"#define BUF_SIZE 1024 /* Maximum size for exchanged string */\n" |
| 1044 |
"\\&\n" |
| 1045 |
"/* Define a structure that will be imposed on the shared\n" |
| 1046 |
" memory object */\n" |
| 1047 |
"\\&\n" |
| 1048 |
"struct shmbuf {\n" |
| 1049 |
" sem_t sem1; /* POSIX unnamed semaphore */\n" |
| 1050 |
" sem_t sem2; /* POSIX unnamed semaphore */\n" |
| 1051 |
" size_t cnt; /* Number of bytes used in \\[aq]buf\\[aq] */\n" |
| 1052 |
" char buf[BUF_SIZE]; /* Data being transferred */\n" |
| 1053 |
"};\n" |
| 1054 |
"\\&\n" |
| 1055 |
"#endif // include guard\n" |
| 1056 |
msgstr "" |
| 1057 |
|
| 1058 |
#. type: Plain text |
| 1059 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1060 |
#, no-wrap |
| 1061 |
msgid "" |
| 1062 |
"/* pshm_ucase_bounce.c\n" |
| 1063 |
"\\&\n" |
| 1064 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1065 |
"*/\n" |
| 1066 |
"#include E<lt>ctype.hE<gt>\n" |
| 1067 |
"#include E<lt>fcntl.hE<gt>\n" |
| 1068 |
"#include E<lt>stdio.hE<gt>\n" |
| 1069 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1070 |
"#include E<lt>sys/mman.hE<gt>\n" |
| 1071 |
"#include E<lt>unistd.hE<gt>\n" |
| 1072 |
"\\&\n" |
| 1073 |
"#include \"pshm_ucase.h\"\n" |
| 1074 |
"\\&\n" |
| 1075 |
"int\n" |
| 1076 |
"main(int argc, char *argv[])\n" |
| 1077 |
"{\n" |
| 1078 |
" int fd;\n" |
| 1079 |
" char *shmpath;\n" |
| 1080 |
" struct shmbuf *shmp;\n" |
| 1081 |
"\\&\n" |
| 1082 |
" if (argc != 2) {\n" |
| 1083 |
" fprintf(stderr, \"Usage: %s /shm-path\\[rs]n\", argv[0]);\n" |
| 1084 |
" exit(EXIT_FAILURE);\n" |
| 1085 |
" }\n" |
| 1086 |
"\\&\n" |
| 1087 |
" shmpath = argv[1];\n" |
| 1088 |
"\\&\n" |
| 1089 |
" /* Create shared memory object and set its size to the size\n" |
| 1090 |
" of our structure. */\n" |
| 1091 |
"\\&\n" |
| 1092 |
" fd = shm_open(shmpath, O_CREAT | O_EXCL | O_RDWR, 0600);\n" |
| 1093 |
" if (fd == -1)\n" |
| 1094 |
" errExit(\"shm_open\");\n" |
| 1095 |
"\\&\n" |
| 1096 |
" if (ftruncate(fd, sizeof(struct shmbuf)) == -1)\n" |
| 1097 |
" errExit(\"ftruncate\");\n" |
| 1098 |
"\\&\n" |
| 1099 |
" /* Map the object into the caller\\[aq]s address space. */\n" |
| 1100 |
"\\&\n" |
| 1101 |
" shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,\n" |
| 1102 |
" MAP_SHARED, fd, 0);\n" |
| 1103 |
" if (shmp == MAP_FAILED)\n" |
| 1104 |
" errExit(\"mmap\");\n" |
| 1105 |
"\\&\n" |
| 1106 |
" /* Initialize semaphores as process-shared, with value 0. */\n" |
| 1107 |
"\\&\n" |
| 1108 |
" if (sem_init(&shmp-E<gt>sem1, 1, 0) == -1)\n" |
| 1109 |
" errExit(\"sem_init-sem1\");\n" |
| 1110 |
" if (sem_init(&shmp-E<gt>sem2, 1, 0) == -1)\n" |
| 1111 |
" errExit(\"sem_init-sem2\");\n" |
| 1112 |
"\\&\n" |
| 1113 |
" /* Wait for \\[aq]sem1\\[aq] to be posted by peer before touching\n" |
| 1114 |
" shared memory. */\n" |
| 1115 |
"\\&\n" |
| 1116 |
" if (sem_wait(&shmp-E<gt>sem1) == -1)\n" |
| 1117 |
" errExit(\"sem_wait\");\n" |
| 1118 |
"\\&\n" |
| 1119 |
" /* Convert data in shared memory into upper case. */\n" |
| 1120 |
"\\&\n" |
| 1121 |
" for (size_t j = 0; j E<lt> shmp-E<gt>cnt; j++)\n" |
| 1122 |
" shmp-E<gt>buf[j] = toupper((unsigned char) shmp-E<gt>buf[j]);\n" |
| 1123 |
"\\&\n" |
| 1124 |
" /* Post \\[aq]sem2\\[aq] to tell the peer that it can now\n" |
| 1125 |
" access the modified data in shared memory. */\n" |
| 1126 |
"\\&\n" |
| 1127 |
" if (sem_post(&shmp-E<gt>sem2) == -1)\n" |
| 1128 |
" errExit(\"sem_post\");\n" |
| 1129 |
"\\&\n" |
| 1130 |
" /* Unlink the shared memory object. Even if the peer process\n" |
| 1131 |
" is still using the object, this is okay. The object will\n" |
| 1132 |
" be removed only after all open references are closed. */\n" |
| 1133 |
"\\&\n" |
| 1134 |
" shm_unlink(shmpath);\n" |
| 1135 |
"\\&\n" |
| 1136 |
" exit(EXIT_SUCCESS);\n" |
| 1137 |
"}\n" |
| 1138 |
msgstr "" |
| 1139 |
|
| 1140 |
#. type: Plain text |
| 1141 |
#: debian-trixie |
| 1142 |
#, no-wrap |
| 1143 |
msgid "" |
| 1144 |
"/* pshm_ucase_send.c\n" |
| 1145 |
"\\&\n" |
| 1146 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1147 |
"*/\n" |
| 1148 |
"#include E<lt>fcntl.hE<gt>\n" |
| 1149 |
"#include E<lt>stddef.hE<gt>\n" |
| 1150 |
"#include E<lt>stdio.hE<gt>\n" |
| 1151 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1152 |
"#include E<lt>string.hE<gt>\n" |
| 1153 |
"#include E<lt>sys/mman.hE<gt>\n" |
| 1154 |
"#include E<lt>unistd.hE<gt>\n" |
| 1155 |
"\\&\n" |
| 1156 |
"#include \"pshm_ucase.h\"\n" |
| 1157 |
"\\&\n" |
| 1158 |
"int\n" |
| 1159 |
"main(int argc, char *argv[])\n" |
| 1160 |
"{\n" |
| 1161 |
" int fd;\n" |
| 1162 |
" char *shmpath, *string;\n" |
| 1163 |
" size_t len;\n" |
| 1164 |
" struct shmbuf *shmp;\n" |
| 1165 |
"\\&\n" |
| 1166 |
" if (argc != 3) {\n" |
| 1167 |
" fprintf(stderr, \"Usage: %s /shm-path string\\[rs]n\", argv[0]);\n" |
| 1168 |
" exit(EXIT_FAILURE);\n" |
| 1169 |
" }\n" |
| 1170 |
"\\&\n" |
| 1171 |
" shmpath = argv[1];\n" |
| 1172 |
" string = argv[2];\n" |
| 1173 |
" len = strlen(string);\n" |
| 1174 |
"\\&\n" |
| 1175 |
" if (len E<gt> BUF_SIZE) {\n" |
| 1176 |
" fprintf(stderr, \"String is too long\\[rs]n\");\n" |
| 1177 |
" exit(EXIT_FAILURE);\n" |
| 1178 |
" }\n" |
| 1179 |
"\\&\n" |
| 1180 |
" /* Open the existing shared memory object and map it\n" |
| 1181 |
" into the caller\\[aq]s address space. */\n" |
| 1182 |
"\\&\n" |
| 1183 |
" fd = shm_open(shmpath, O_RDWR, 0);\n" |
| 1184 |
" if (fd == -1)\n" |
| 1185 |
" errExit(\"shm_open\");\n" |
| 1186 |
"\\&\n" |
| 1187 |
" shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,\n" |
| 1188 |
" MAP_SHARED, fd, 0);\n" |
| 1189 |
" if (shmp == MAP_FAILED)\n" |
| 1190 |
" errExit(\"mmap\");\n" |
| 1191 |
"\\&\n" |
| 1192 |
" /* Copy data into the shared memory object. */\n" |
| 1193 |
"\\&\n" |
| 1194 |
" shmp-E<gt>cnt = len;\n" |
| 1195 |
" memcpy(&shmp-E<gt>buf, string, len);\n" |
| 1196 |
"\\&\n" |
| 1197 |
" /* Tell peer that it can now access shared memory. */\n" |
| 1198 |
"\\&\n" |
| 1199 |
" if (sem_post(&shmp-E<gt>sem1) == -1)\n" |
| 1200 |
" errExit(\"sem_post\");\n" |
| 1201 |
"\\&\n" |
| 1202 |
" /* Wait until peer says that it has finished accessing\n" |
| 1203 |
" the shared memory. */\n" |
| 1204 |
"\\&\n" |
| 1205 |
" if (sem_wait(&shmp-E<gt>sem2) == -1)\n" |
| 1206 |
" errExit(\"sem_wait\");\n" |
| 1207 |
"\\&\n" |
| 1208 |
" /* Write modified data in shared memory to standard output. */\n" |
| 1209 |
"\\&\n" |
| 1210 |
" write(STDOUT_FILENO, &shmp-E<gt>buf, len);\n" |
| 1211 |
" write(STDOUT_FILENO, \"\\[rs]n\", 1);\n" |
| 1212 |
"\\&\n" |
| 1213 |
" exit(EXIT_SUCCESS);\n" |
| 1214 |
"}\n" |
| 1215 |
msgstr "" |
| 1216 |
|
| 1217 |
#. type: TH |
| 1218 |
#: fedora-44 fedora-rawhide |
| 1219 |
#, no-wrap |
| 1220 |
msgid "2024-07-23" |
| 1221 |
msgstr "23 juillet 2024" |
| 1222 |
|
| 1223 |
#. type: TH |
| 1224 |
#: fedora-44 fedora-rawhide |
| 1225 |
#, no-wrap |
| 1226 |
msgid "Linux man-pages 6.13" |
| 1227 |
msgstr "Pages du manuel de Linux 6.13" |
| 1228 |
|
| 1229 |
#. type: Plain text |
| 1230 |
#: fedora-44 fedora-rawhide |
| 1231 |
#, no-wrap |
| 1232 |
msgid "" |
| 1233 |
"/* pshm_ucase_send.c\n" |
| 1234 |
"\\&\n" |
| 1235 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1236 |
"*/\n" |
| 1237 |
"#include E<lt>fcntl.hE<gt>\n" |
| 1238 |
"#include E<lt>stddef.hE<gt>\n" |
| 1239 |
"#include E<lt>stdio.hE<gt>\n" |
| 1240 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1241 |
"#include E<lt>string.hE<gt>\n" |
| 1242 |
"#include E<lt>sys/mman.hE<gt>\n" |
| 1243 |
"#include E<lt>unistd.hE<gt>\n" |
| 1244 |
"\\&\n" |
| 1245 |
"#include \"pshm_ucase.h\"\n" |
| 1246 |
"\\&\n" |
| 1247 |
"int\n" |
| 1248 |
"main(int argc, char *argv[])\n" |
| 1249 |
"{\n" |
| 1250 |
" int fd;\n" |
| 1251 |
" char *shmpath, *string;\n" |
| 1252 |
" size_t len;\n" |
| 1253 |
" struct shmbuf *shmp;\n" |
| 1254 |
"\\&\n" |
| 1255 |
" if (argc != 3) {\n" |
| 1256 |
" fprintf(stderr, \"Usage: %s /shm-path string\\[rs]n\", argv[0]);\n" |
| 1257 |
" exit(EXIT_FAILURE);\n" |
| 1258 |
" }\n" |
| 1259 |
"\\&\n" |
| 1260 |
" shmpath = argv[1];\n" |
| 1261 |
" string = argv[2];\n" |
| 1262 |
" len = strlen(string);\n" |
| 1263 |
"\\&\n" |
| 1264 |
" if (len E<gt> BUF_SIZE) {\n" |
| 1265 |
" fprintf(stderr, \"String is too long\\[rs]n\");\n" |
| 1266 |
" exit(EXIT_FAILURE);\n" |
| 1267 |
" }\n" |
| 1268 |
"\\&\n" |
| 1269 |
" /* Open the existing shared memory object and map it\n" |
| 1270 |
" into the caller\\[aq]s address space. */\n" |
| 1271 |
"\\&\n" |
| 1272 |
" fd = shm_open(shmpath, O_RDWR, 0);\n" |
| 1273 |
" if (fd == -1)\n" |
| 1274 |
" errExit(\"shm_open\");\n" |
| 1275 |
"\\&\n" |
| 1276 |
" shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,\n" |
| 1277 |
" MAP_SHARED, fd, 0);\n" |
| 1278 |
" if (shmp == MAP_FAILED)\n" |
| 1279 |
" errExit(\"mmap\");\n" |
| 1280 |
"\\&\n" |
| 1281 |
" /* Copy data into the shared memory object. */\n" |
| 1282 |
"\\&\n" |
| 1283 |
" shmp-E<gt>cnt = len;\n" |
| 1284 |
" memcpy(&shmp-E<gt>buf, string, len);\n" |
| 1285 |
"\\&\n" |
| 1286 |
" /* Tell peer that it can now access shared memory. */\n" |
| 1287 |
"\\&\n" |
| 1288 |
" if (sem_post(&shmp-E<gt>sem1) == -1)\n" |
| 1289 |
" errExit(\"sem_post\");\n" |
| 1290 |
"\\&\n" |
| 1291 |
" /* Wait until peer says that it has finished accessing\n" |
| 1292 |
" the shared memory. */\n" |
| 1293 |
"\\&\n" |
| 1294 |
" if (sem_wait(&shmp-E<gt>sem2) == -1)\n" |
| 1295 |
" errExit(\"sem_wait\");\n" |
| 1296 |
"\\&\n" |
| 1297 |
" /* Write modified data in shared memory to standard output. */\n" |
| 1298 |
"\\&\n" |
| 1299 |
" if (write(STDOUT_FILENO, &shmp-E<gt>buf, len) == -1)\n" |
| 1300 |
" errExit(\"write\");\n" |
| 1301 |
" if (write(STDOUT_FILENO, \"\\[rs]n\", 1) == -1)\n" |
| 1302 |
" errExit(\"write\");\n" |
| 1303 |
"\\&\n" |
| 1304 |
" exit(EXIT_SUCCESS);\n" |
| 1305 |
"}\n" |
| 1306 |
msgstr "" |
| 1307 |
|
| 1308 |
#. type: TH |
| 1309 |
#: mageia-cauldron |
| 1310 |
#, no-wrap |
| 1311 |
msgid "Linux man-pages 6.17" |
| 1312 |
msgstr "Pages du manuel de Linux 6.17" |
| 1313 |
|
| 1314 |
#. type: TH |
| 1315 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1316 |
#, no-wrap |
| 1317 |
msgid "Linux man-pages (unreleased)" |
| 1318 |
msgstr "Pages du manuel de Linux (non publiées)" |