| 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 |
# Jean-Philippe MENGUAL <[email protected]>, 2022-2024. |
| 19 |
msgid "" |
| 20 |
msgstr "" |
| 21 |
"Project-Id-Version: manpages-l10n 4.22.0\n" |
| 22 |
"POT-Creation-Date: 2026-06-05 06:43+0200\n" |
| 23 |
"PO-Revision-Date: 2024-06-02 11:15+0200\n" |
| 24 |
"Last-Translator: Jean-Philippe MENGUAL <[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: Lokalize 22.12.3\n" |
| 32 |
|
| 33 |
#. type: TH |
| 34 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 35 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 36 |
#, no-wrap |
| 37 |
msgid "SHMOP" |
| 38 |
msgstr "SHMOP" |
| 39 |
|
| 40 |
#. type: TH |
| 41 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 42 |
#: opensuse-tumbleweed |
| 43 |
#, no-wrap |
| 44 |
msgid "2026-02-08" |
| 45 |
msgstr "8 février 2026" |
| 46 |
|
| 47 |
#. type: TH |
| 48 |
#: archlinux debian-unstable |
| 49 |
#, no-wrap |
| 50 |
msgid "Linux man-pages 6.18" |
| 51 |
msgstr "Pages du manuel de Linux 6.18" |
| 52 |
|
| 53 |
#. type: SH |
| 54 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 55 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 56 |
#, no-wrap |
| 57 |
msgid "NAME" |
| 58 |
msgstr "NOM" |
| 59 |
|
| 60 |
#. type: Plain text |
| 61 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 62 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 63 |
msgid "shmat, shmdt - System V shared memory operations" |
| 64 |
msgstr "shmat, shmdt - Opérations sur la mémoire partagée System V" |
| 65 |
|
| 66 |
#. type: SH |
| 67 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 68 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 69 |
#, no-wrap |
| 70 |
msgid "LIBRARY" |
| 71 |
msgstr "BIBLIOTHÈQUE" |
| 72 |
|
| 73 |
#. type: Plain text |
| 74 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 75 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 76 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 77 |
msgstr "Bibliothèque C standard (I<libc>,\\ I<-lc>)" |
| 78 |
|
| 79 |
#. type: SH |
| 80 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 81 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 82 |
#, no-wrap |
| 83 |
msgid "SYNOPSIS" |
| 84 |
msgstr "SYNOPSIS" |
| 85 |
|
| 86 |
#. type: Plain text |
| 87 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 88 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 89 |
#, no-wrap |
| 90 |
msgid "B<#include E<lt>sys/shm.hE<gt>>\n" |
| 91 |
msgstr "B<#include E<lt>sys/shm.hE<gt>>\n" |
| 92 |
|
| 93 |
#. type: Plain text |
| 94 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 95 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 96 |
#, no-wrap |
| 97 |
msgid "" |
| 98 |
"B<void *shmat(int >I<shmid>B<, const void *_Nullable >I<shmaddr>B<, int >I<shmflg>B<);>\n" |
| 99 |
"B<int shmdt(const void *>I<shmaddr>B<);>\n" |
| 100 |
msgstr "" |
| 101 |
"B<void *shmat(int >I<shmid>B<, const void *_Nullable >I<shmaddr>B<, int >I<shmflg>B<);>\n" |
| 102 |
"B<int shmdt(const void *>I<shmaddr>B<);>\n" |
| 103 |
|
| 104 |
#. type: SH |
| 105 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 106 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 107 |
#, no-wrap |
| 108 |
msgid "DESCRIPTION" |
| 109 |
msgstr "DESCRIPTION" |
| 110 |
|
| 111 |
#. type: SS |
| 112 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 113 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 114 |
#, no-wrap |
| 115 |
msgid "shmat()" |
| 116 |
msgstr "shmat()" |
| 117 |
|
| 118 |
#. type: Plain text |
| 119 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 120 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 121 |
msgid "" |
| 122 |
"B<shmat>() attaches the System\\ V shared memory segment identified by " |
| 123 |
"I<shmid> to the address space of the calling process. The attaching address " |
| 124 |
"is specified by I<shmaddr> with one of the following criteria:" |
| 125 |
msgstr "" |
| 126 |
"La fonction B<shmat>() attache le segment de mémoire partagée System V " |
| 127 |
"identifié par I<shmid> au segment de données du processus appelant. " |
| 128 |
"L'adresse d'attachement est indiquée par I<shmaddr> avec les critères " |
| 129 |
"suivants\\ :" |
| 130 |
|
| 131 |
#. type: IP |
| 132 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 133 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 134 |
#, no-wrap |
| 135 |
msgid "\\[bu]" |
| 136 |
msgstr "-" |
| 137 |
|
| 138 |
#. type: Plain text |
| 139 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 140 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 141 |
msgid "" |
| 142 |
"If I<shmaddr> is NULL, the system chooses a suitable (unused) page-aligned " |
| 143 |
"address to attach the segment." |
| 144 |
msgstr "" |
| 145 |
"Si I<shmaddr> vaut NULL, le système choisit une adresse (non utilisée) " |
| 146 |
"alignée sur la page convenant pour attacher le segment." |
| 147 |
|
| 148 |
#. type: Plain text |
| 149 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 150 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 151 |
msgid "" |
| 152 |
"If I<shmaddr> isn't NULL and B<SHM_RND> is specified in I<shmflg>, the " |
| 153 |
"attach occurs at the address equal to I<shmaddr> rounded down to the nearest " |
| 154 |
"multiple of B<SHMLBA>." |
| 155 |
msgstr "" |
| 156 |
"Si I<shmaddr> n'est pas NULL et si B<SHM_RND> est indiqué dans I<shmflg>, " |
| 157 |
"l'attachement a lieu à l'adresse égale à I<shmaddr> arrondie au multiple " |
| 158 |
"inférieur de B<SHMLBA>." |
| 159 |
|
| 160 |
#. type: Plain text |
| 161 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 162 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 163 |
msgid "" |
| 164 |
"Otherwise, I<shmaddr> must be a page-aligned address at which the attach " |
| 165 |
"occurs." |
| 166 |
msgstr "" |
| 167 |
"Sinon, I<shmaddr> doit être alignée sur une frontière de page, où " |
| 168 |
"l'attachement a lieu." |
| 169 |
|
| 170 |
#. type: Plain text |
| 171 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 172 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 173 |
msgid "" |
| 174 |
"In addition to B<SHM_RND>, the following flags may be specified in the " |
| 175 |
"I<shmflg> bit-mask argument:" |
| 176 |
msgstr "" |
| 177 |
"En plus de B<SHM_RND>, les attributs suivants peuvent être indiqués dans le " |
| 178 |
"paramètre de masque I<shmflg> :" |
| 179 |
|
| 180 |
#. type: TP |
| 181 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 182 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 183 |
#, no-wrap |
| 184 |
msgid "B<SHM_EXEC> (Linux-specific; since Linux 2.6.9)" |
| 185 |
msgstr "B<SHM_EXEC> (spécifique à Linux, depuis Linux 2.6.9)" |
| 186 |
|
| 187 |
#. type: Plain text |
| 188 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 189 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 190 |
msgid "" |
| 191 |
"Allow the contents of the segment to be executed. The caller must have " |
| 192 |
"execute permission on the segment." |
| 193 |
msgstr "" |
| 194 |
"Autoriser l'exécution du contenu du segment. L'appelant doit disposer du " |
| 195 |
"droit d'exécution sur le segment." |
| 196 |
|
| 197 |
#. type: TP |
| 198 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 199 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 200 |
#, no-wrap |
| 201 |
msgid "B<SHM_RDONLY>" |
| 202 |
msgstr "B<SHM_RDONLY>" |
| 203 |
|
| 204 |
#. type: Plain text |
| 205 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 206 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 207 |
msgid "" |
| 208 |
"Attach the segment for read-only access. The process must have read " |
| 209 |
"permission for the segment. If this flag is not specified, the segment is " |
| 210 |
"attached for read and write access, and the process must have read and write " |
| 211 |
"permission for the segment. There is no notion of a write-only shared " |
| 212 |
"memory segment." |
| 213 |
msgstr "" |
| 214 |
"Attacher le segment en lecture seule. Le processus doit disposer de la " |
| 215 |
"permission de lecture dessus. Si cet attribut n'est pas indiqué, le segment " |
| 216 |
"est attaché en lecture et écriture, et le processus doit disposer des deux " |
| 217 |
"permissions d'accès. Il n'y a pas de notion d'écriture seule pour les " |
| 218 |
"segments de mémoire partagée." |
| 219 |
|
| 220 |
#. type: TP |
| 221 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 222 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 223 |
#, no-wrap |
| 224 |
msgid "B<SHM_REMAP> (Linux-specific)" |
| 225 |
msgstr "B<SHM_REMAP> (spécifique à Linux)" |
| 226 |
|
| 227 |
#. type: Plain text |
| 228 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 229 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 230 |
msgid "" |
| 231 |
"This flag specifies that the mapping of the segment should replace any " |
| 232 |
"existing mapping in the range starting at I<shmaddr> and continuing for the " |
| 233 |
"size of the segment. (Normally, an B<EINVAL> error would result if a " |
| 234 |
"mapping already exists in this address range.) In this case, I<shmaddr> " |
| 235 |
"must not be NULL." |
| 236 |
msgstr "" |
| 237 |
"Cet attribut indique que la projection du segment doit remplacer une " |
| 238 |
"projection précédente dans l'intervalle commençant en I<shmaddr> et " |
| 239 |
"s'étendant sur la taille du segment. Normalement une erreur B<EINVAL> " |
| 240 |
"devrait se produire si une projection existe déjà dans l'intervalle indiqué. " |
| 241 |
"Dans ce cas, I<shmaddr> ne doit pas être B<NULL>." |
| 242 |
|
| 243 |
#. type: Plain text |
| 244 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 245 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 246 |
msgid "" |
| 247 |
"The B<brk>(2) value of the calling process is not altered by the attach. " |
| 248 |
"The segment will automatically be detached at process exit. The same " |
| 249 |
"segment may be attached as a read and as a read-write one, and more than " |
| 250 |
"once, in the process's address space." |
| 251 |
msgstr "" |
| 252 |
"La valeur B<brk>(2) du processus appelant n'est pas altérée par " |
| 253 |
"l'attachement. Le segment est automatiquement détaché quand le processus se " |
| 254 |
"termine. Le même segment peut être attaché à la fois en lecture seule et en " |
| 255 |
"lecture/écriture. Il peut également être attaché en plusieurs endroits de " |
| 256 |
"l'espace d'adressage du processus." |
| 257 |
|
| 258 |
#. type: Plain text |
| 259 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 260 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 261 |
msgid "" |
| 262 |
"A successful B<shmat>() call updates the members of the I<shmid_ds> " |
| 263 |
"structure (see B<shmctl>(2)) associated with the shared memory segment as " |
| 264 |
"follows:" |
| 265 |
msgstr "" |
| 266 |
"Quand B<shmat>() réussit, les membres de la structure I<shmid_ds> associée " |
| 267 |
"au segment de mémoire partagée (consultez B<shmctl>(2)) sont mis à jour " |
| 268 |
"ainsi\\ :" |
| 269 |
|
| 270 |
#. type: Plain text |
| 271 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 272 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 273 |
msgid "I<shm_atime> is set to the current time." |
| 274 |
msgstr "I<shm_atime> correspond à l'heure actuelle." |
| 275 |
|
| 276 |
#. type: Plain text |
| 277 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 278 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 279 |
msgid "I<shm_lpid> is set to the process-ID of the calling process." |
| 280 |
msgstr "I<shm_lpid> contient le PID de l'appelant." |
| 281 |
|
| 282 |
#. type: Plain text |
| 283 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 284 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 285 |
msgid "I<shm_nattch> is incremented by one." |
| 286 |
msgstr "I<shm_nattch> est incrémenté de 1." |
| 287 |
|
| 288 |
#. type: SS |
| 289 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 290 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 291 |
#, no-wrap |
| 292 |
msgid "shmdt()" |
| 293 |
msgstr "shmdt()" |
| 294 |
|
| 295 |
#. type: Plain text |
| 296 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 297 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 298 |
msgid "" |
| 299 |
"B<shmdt>() detaches the shared memory segment located at the address " |
| 300 |
"specified by I<shmaddr> from the address space of the calling process. The " |
| 301 |
"to-be-detached segment must be currently attached with I<shmaddr> equal to " |
| 302 |
"the value returned by the attaching B<shmat>() call." |
| 303 |
msgstr "" |
| 304 |
"La fonction B<shmdt>() détache le segment de mémoire partagée situé à " |
| 305 |
"l'adresse indiquée par I<shmaddr>. Le segment doit être effectivement " |
| 306 |
"attaché, et l'adresse I<shmaddr> doit être celle renvoyée précédemment par " |
| 307 |
"l'appel B<shmat>()." |
| 308 |
|
| 309 |
#. type: Plain text |
| 310 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 311 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 312 |
msgid "" |
| 313 |
"On a successful B<shmdt>() call, the system updates the members of the " |
| 314 |
"I<shmid_ds> structure associated with the shared memory segment as follows:" |
| 315 |
msgstr "" |
| 316 |
"Quand B<shmdt>() réussit, les membres de la structure I<shmid_ds> associée " |
| 317 |
"au segment de mémoire partagée sont mis à jour ainsi par le système\\ :" |
| 318 |
|
| 319 |
#. type: Plain text |
| 320 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 321 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 322 |
msgid "I<shm_dtime> is set to the current time." |
| 323 |
msgstr "I<shm_dtime> correspond à l'heure actuelle." |
| 324 |
|
| 325 |
#. type: Plain text |
| 326 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 327 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 328 |
msgid "" |
| 329 |
"I<shm_nattch> is decremented by one. If it becomes 0 and the segment is " |
| 330 |
"marked for deletion, the segment is deleted." |
| 331 |
msgstr "" |
| 332 |
"I<shm_nattch> est décrémenté de 1. S'il devient nul et si le segment est " |
| 333 |
"marqué pour destruction, il est effectivement détruit." |
| 334 |
|
| 335 |
#. type: SH |
| 336 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 337 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 338 |
#, no-wrap |
| 339 |
msgid "RETURN VALUE" |
| 340 |
msgstr "VALEUR RENVOYÉE" |
| 341 |
|
| 342 |
#. type: Plain text |
| 343 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 344 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 345 |
msgid "" |
| 346 |
"On success, B<shmat>() returns the address of the attached shared memory " |
| 347 |
"segment; on error, I<(void\\ *)\\ -1> is returned, and I<errno> is set to " |
| 348 |
"indicate the error." |
| 349 |
msgstr "" |
| 350 |
"S'il réussit, B<shmat>() renvoie l'adresse d'attachement du segment de " |
| 351 |
"mémoire partagée. En cas d'échec I<(void\\ *)\\ -1> est renvoyé, et I<errno> " |
| 352 |
"est positionné pour indiquer l'erreur." |
| 353 |
|
| 354 |
#. type: Plain text |
| 355 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 356 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 357 |
msgid "" |
| 358 |
"On success, B<shmdt>() returns 0; on error -1 is returned, and I<errno> is " |
| 359 |
"set to indicate the error." |
| 360 |
msgstr "" |
| 361 |
"S'il réussit, B<shmdt>() renvoie B<0>. En cas d'échec, B<-1> est renvoyé et " |
| 362 |
"I<errno> est positionné pour indiquer l'erreur." |
| 363 |
|
| 364 |
#. type: SH |
| 365 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 366 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 367 |
#, no-wrap |
| 368 |
msgid "ERRORS" |
| 369 |
msgstr "ERREURS" |
| 370 |
|
| 371 |
#. type: Plain text |
| 372 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 373 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 374 |
msgid "B<shmat>() can fail with one of the following errors:" |
| 375 |
msgstr "B<shmat>() peut échouer avec une des erreurs suivantes :" |
| 376 |
|
| 377 |
#. type: TP |
| 378 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 379 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 380 |
#, no-wrap |
| 381 |
msgid "B<EACCES>" |
| 382 |
msgstr "B<EACCES>" |
| 383 |
|
| 384 |
#. type: Plain text |
| 385 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 386 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 387 |
msgid "" |
| 388 |
"The calling process does not have the required permissions for the requested " |
| 389 |
"attach type, and does not have the B<CAP_IPC_OWNER> capability in the user " |
| 390 |
"namespace that governs its IPC namespace." |
| 391 |
msgstr "" |
| 392 |
"Le processus appelant n'a pas les permissions d'accès nécessaires pour ce " |
| 393 |
"type d'attachement et n'a pas la capacité B<CAP_IPC_OWNER> dans l'espace de " |
| 394 |
"noms utilisateur qui gère son espace de noms IPC." |
| 395 |
|
| 396 |
#. type: TP |
| 397 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 398 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 399 |
#, no-wrap |
| 400 |
msgid "B<EIDRM>" |
| 401 |
msgstr "B<EIDRM>" |
| 402 |
|
| 403 |
#. type: Plain text |
| 404 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 405 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 406 |
msgid "I<shmid> points to a removed identifier." |
| 407 |
msgstr "I<shmid> pointe sur un segment détruit." |
| 408 |
|
| 409 |
#. type: TP |
| 410 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 411 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 412 |
#, no-wrap |
| 413 |
msgid "B<EINVAL>" |
| 414 |
msgstr "B<EINVAL>" |
| 415 |
|
| 416 |
#. type: Plain text |
| 417 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 418 |
#: opensuse-tumbleweed |
| 419 |
#, fuzzy |
| 420 |
#| msgid "" |
| 421 |
#| "Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> " |
| 422 |
#| "was not specified) or invalid I<shmaddr> value, or can't attach segment " |
| 423 |
#| "at I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL." |
| 424 |
msgid "" |
| 425 |
"Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was " |
| 426 |
"not specified) or invalid I<shmaddr> value, or can't attach segment at " |
| 427 |
"I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL." |
| 428 |
msgstr "" |
| 429 |
"La valeur I<shmid> n'est pas valable, mal alignée (c'est-à-dire pas alignée " |
| 430 |
"sur une page et B<SHM_RND> n'a pas été précisé) ou la valeur I<shmaddr> " |
| 431 |
"n'est pas valable, ou ne peut pas être attaché à I<shmaddr>, ou B<SHM_REMAP> " |
| 432 |
"a été réclamé et I<shmaddr> est B<NULL>." |
| 433 |
|
| 434 |
#. type: TP |
| 435 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 436 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 437 |
#, no-wrap |
| 438 |
msgid "B<ENOMEM>" |
| 439 |
msgstr "B<ENOMEM>" |
| 440 |
|
| 441 |
#. type: Plain text |
| 442 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 443 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 444 |
msgid "Could not allocate memory for the descriptor or for the page tables." |
| 445 |
msgstr "Pas assez de mémoire pour le descripteur ou pour les tables de pages." |
| 446 |
|
| 447 |
#. type: Plain text |
| 448 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 449 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 450 |
msgid "B<shmdt>() can fail with one of the following errors:" |
| 451 |
msgstr "B<shmdt>() peut échouer avec une des erreurs suivantes :" |
| 452 |
|
| 453 |
#. The following since Linux 2.6.17-rc1: |
| 454 |
#. type: Plain text |
| 455 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 456 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 457 |
msgid "" |
| 458 |
"There is no shared memory segment attached at I<shmaddr>; or, I<shmaddr> is " |
| 459 |
"not aligned on a page boundary." |
| 460 |
msgstr "" |
| 461 |
"Aucun segment de mémoire partagée n'est attaché à l'adresse I<shmaddr>, ou " |
| 462 |
"bien I<shmaddr> n'est pas aligné une limite de page." |
| 463 |
|
| 464 |
#. type: SH |
| 465 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 466 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 467 |
#, no-wrap |
| 468 |
msgid "STANDARDS" |
| 469 |
msgstr "NORMES" |
| 470 |
|
| 471 |
#. type: Plain text |
| 472 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 473 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 474 |
msgid "POSIX.1-2008." |
| 475 |
msgstr "POSIX.1-2008." |
| 476 |
|
| 477 |
#. type: SH |
| 478 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 479 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 480 |
#, no-wrap |
| 481 |
msgid "HISTORY" |
| 482 |
msgstr "HISTORIQUE" |
| 483 |
|
| 484 |
#. SVr4 documents an additional error condition EMFILE. |
| 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 "POSIX.1-2001, SVr4." |
| 489 |
msgstr "POSIX.1-2001, SVr4." |
| 490 |
|
| 491 |
#. type: Plain text |
| 492 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 493 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 494 |
msgid "" |
| 495 |
"In SVID 3 (or perhaps earlier), the type of the I<shmaddr> argument was " |
| 496 |
"changed from I<char\\ *> into I<const void\\ *>, and the returned type of " |
| 497 |
"B<shmat>() from I<char\\ *> into I<void\\ *>." |
| 498 |
msgstr "" |
| 499 |
"Dans SVID 3 (ou peut être auparavant), le type de l'argument I<shmaddr> a " |
| 500 |
"été modifié de I<char\\ *> en I<const void\\ *>, et le type de retour de " |
| 501 |
"B<shmat>() de I<char\\ *> en I<void\\ *>." |
| 502 |
|
| 503 |
#. type: Plain text |
| 504 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 505 |
#: opensuse-tumbleweed |
| 506 |
msgid "" |
| 507 |
"POSIX.1-2024 changed the error code from I<(void\\ *)\\ -1> to B<SHM_FAILED>." |
| 508 |
msgstr "" |
| 509 |
|
| 510 |
#. type: SH |
| 511 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 512 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 513 |
#, no-wrap |
| 514 |
msgid "NOTES" |
| 515 |
msgstr "NOTES" |
| 516 |
|
| 517 |
#. type: Plain text |
| 518 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 519 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 520 |
msgid "" |
| 521 |
"After a B<fork>(2), the child inherits the attached shared memory segments." |
| 522 |
msgstr "" |
| 523 |
"Après un B<fork>(2), l'enfant hérite des segments de mémoire partagée " |
| 524 |
"attachés." |
| 525 |
|
| 526 |
#. type: Plain text |
| 527 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 528 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 529 |
msgid "" |
| 530 |
"After an B<execve>(2), all attached shared memory segments are detached from " |
| 531 |
"the process." |
| 532 |
msgstr "" |
| 533 |
"Après un B<execve>(2), tous les segments de mémoire partagée sont détachés " |
| 534 |
"du (pas détruits)." |
| 535 |
|
| 536 |
#. type: Plain text |
| 537 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 538 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 539 |
msgid "" |
| 540 |
"Upon B<_exit>(2), all attached shared memory segments are detached from the " |
| 541 |
"process." |
| 542 |
msgstr "" |
| 543 |
"Lors d'un B<_exit>(2), tous les segments de mémoire partagée sont détachés " |
| 544 |
"du processus (pas détruits)." |
| 545 |
|
| 546 |
#. type: Plain text |
| 547 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 548 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 549 |
msgid "" |
| 550 |
"Using B<shmat>() with I<shmaddr> equal to NULL is the preferred, portable " |
| 551 |
"way of attaching a shared memory segment. Be aware that the shared memory " |
| 552 |
"segment attached in this way may be attached at different addresses in " |
| 553 |
"different processes. Therefore, any pointers maintained within the shared " |
| 554 |
"memory must be made relative (typically to the starting address of the " |
| 555 |
"segment), rather than absolute." |
| 556 |
msgstr "" |
| 557 |
"Utiliser B<shmat>() avec I<shmaddr> égale à NULL est la manière conseillée " |
| 558 |
"et portable d'attacher un segment de mémoire partagée. Soyez conscients que " |
| 559 |
"le segment attaché de cette manière peut l'être à des adresses différentes " |
| 560 |
"dans les différents processus. Ainsi, tout pointeur contenu dans la mémoire " |
| 561 |
"partagée doit être relatif (habituellement par rapport à l'adresse de départ " |
| 562 |
"du segment) et pas absolu." |
| 563 |
|
| 564 |
#. type: Plain text |
| 565 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 566 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 567 |
msgid "" |
| 568 |
"On Linux, it is possible to attach a shared memory segment even if it is " |
| 569 |
"already marked to be deleted. However, POSIX.1 does not specify this " |
| 570 |
"behavior and many other implementations do not support it." |
| 571 |
msgstr "" |
| 572 |
"Sous Linux, il est possible d'attacher un segment de mémoire partagée qui " |
| 573 |
"est déjà marqué pour effacement. Cependant, ce comportement n'est pas décrit " |
| 574 |
"par POSIX.1 et beaucoup d'autres implémentations ne le permettent pas." |
| 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 "The following system parameter affects B<shmat>():" |
| 580 |
msgstr "Le paramètre système suivant influe sur B<shmat>() :" |
| 581 |
|
| 582 |
#. type: TP |
| 583 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 584 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 585 |
#, no-wrap |
| 586 |
msgid "B<SHMLBA>" |
| 587 |
msgstr "B<SHMLBA>" |
| 588 |
|
| 589 |
#. type: Plain text |
| 590 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 591 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 592 |
msgid "" |
| 593 |
"Segment low boundary address multiple. When explicitly specifying an attach " |
| 594 |
"address in a call to B<shmat>(), the caller should ensure that the address " |
| 595 |
"is a multiple of this value. This is necessary on some architectures, in " |
| 596 |
"order either to ensure good CPU cache performance or to ensure that " |
| 597 |
"different attaches of the same segment have consistent views within the CPU " |
| 598 |
"cache. B<SHMLBA> is normally some multiple of the system page size. (On " |
| 599 |
"many Linux architectures, B<SHMLBA> is the same as the system page size.)" |
| 600 |
msgstr "" |
| 601 |
"Multiple d’adresse pour limite basse de segment. Lors d’une indication " |
| 602 |
"explicite d’adresse d’attache dans un appel B<shmat>(), l’appelant devrait " |
| 603 |
"s’assurer que l’adresse est un multiple de cette valeur. Cela est nécessaire " |
| 604 |
"sur certaines architectures, afin de s’assurer soit de bonne performances du " |
| 605 |
"cache de processeur, soit que différentes attaches du même segment ont des " |
| 606 |
"vues cohérentes dans le cache du processeur. B<SHMLBA> est normalement un " |
| 607 |
"multiple de la taille de page du système (sur de nombreuses architectures " |
| 608 |
"Linux, B<SHMLBA> est identique à la taille de page du système)." |
| 609 |
|
| 610 |
#. type: Plain text |
| 611 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 612 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 613 |
msgid "" |
| 614 |
"The implementation places no intrinsic per-process limit on the number of " |
| 615 |
"shared memory segments (B<SHMSEG>)." |
| 616 |
msgstr "" |
| 617 |
"L'implémentation ne met pas de limite intrinsèque par processus pour le " |
| 618 |
"nombre maximal de segments de mémoire partagée (B<SHMSEG>)." |
| 619 |
|
| 620 |
#. type: SH |
| 621 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 622 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 623 |
#, no-wrap |
| 624 |
msgid "EXAMPLES" |
| 625 |
msgstr "EXEMPLES" |
| 626 |
|
| 627 |
#. type: Plain text |
| 628 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 629 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 630 |
msgid "" |
| 631 |
"The two programs shown below exchange a string using a shared memory " |
| 632 |
"segment. Further details about the programs are given below. First, we " |
| 633 |
"show a shell session demonstrating their use." |
| 634 |
msgstr "" |
| 635 |
"Les deux programmes présentés ci-dessous échangent une chaîne en utilisant " |
| 636 |
"un segment de mémoire partagée. Davantage de détails à leur sujet sont " |
| 637 |
"donnés ci-dessous. Tout d'abord, nous présentons une session d'interpréteur " |
| 638 |
"qui montre leur utilisation." |
| 639 |
|
| 640 |
#. type: Plain text |
| 641 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 642 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 643 |
msgid "" |
| 644 |
"In one terminal window, we run the \"reader\" program, which creates a " |
| 645 |
"System V shared memory segment and a System V semaphore set. The program " |
| 646 |
"prints out the IDs of the created objects, and then waits for the semaphore " |
| 647 |
"to change value." |
| 648 |
msgstr "" |
| 649 |
"Dans une fenêtre de terminal, nous exécutons le programme « reader » qui " |
| 650 |
"crée un segment de mémoire partagée System V et un ensemble de sémaphores " |
| 651 |
"System V. Le programme affiche les identifiants des objets créés puis attend " |
| 652 |
"que le sémaphore modifie la valeur." |
| 653 |
|
| 654 |
#. type: Plain text |
| 655 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 656 |
#: opensuse-tumbleweed |
| 657 |
#, fuzzy, no-wrap |
| 658 |
#| msgid "" |
| 659 |
#| "$ B<./svshm_string_read>\n" |
| 660 |
#| "shmid = 1114194; semid = 15\n" |
| 661 |
msgid "" |
| 662 |
"$B< ./svshm_string_read>;\n" |
| 663 |
"shmid = 1114194\n" |
| 664 |
"semid = 15\n" |
| 665 |
msgstr "" |
| 666 |
"$ B<./svshm_string_read>\n" |
| 667 |
"shmid = 1114194; semid = 15\n" |
| 668 |
|
| 669 |
#. type: Plain text |
| 670 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 671 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 672 |
msgid "" |
| 673 |
"In another terminal window, we run the \"writer\" program. The \"writer\" " |
| 674 |
"program takes three command-line arguments: the IDs of the shared memory " |
| 675 |
"segment and semaphore set created by the \"reader\", and a string. It " |
| 676 |
"attaches the existing shared memory segment, copies the string to the shared " |
| 677 |
"memory, and modifies the semaphore value." |
| 678 |
msgstr "" |
| 679 |
"Dans une autre fenêtre de terminal, on exécute le programme « writer ». Ce " |
| 680 |
"programme prend trois paramètres en ligne de commande : les identifiants du " |
| 681 |
"segment de mémoire partagée et le jeu de sémaphore, créés par le programme " |
| 682 |
"« reader » et une chaîne. Il attache le segment de mémoire partagée " |
| 683 |
"existant, copie la chaîne dans la mémoire partagée et modifie la valeur du " |
| 684 |
"sémaphore." |
| 685 |
|
| 686 |
#. type: Plain text |
| 687 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 688 |
#: opensuse-tumbleweed |
| 689 |
#, fuzzy, no-wrap |
| 690 |
#| msgid "$ B<./svshm_string_write 1114194 15 \\[aq]Hello, world\\[aq]>\n" |
| 691 |
msgid "$B< ./svshm_string_write 1114194 15 \\[aq]Hello, world\\[aq]>;\n" |
| 692 |
msgstr "$ B<./svshm_string_write 1114194 15 \\[aq]Bonjour\\[aq]>\n" |
| 693 |
|
| 694 |
#. type: Plain text |
| 695 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 696 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 697 |
msgid "" |
| 698 |
"Returning to the terminal where the \"reader\" is running, we see that the " |
| 699 |
"program has ceased waiting on the semaphore and has printed the string that " |
| 700 |
"was copied into the shared memory segment by the writer:" |
| 701 |
msgstr "" |
| 702 |
"De retour dans le terminal où s'exécute « reader », on voit que le programme " |
| 703 |
"a cessé d'attendre le sémaphore et affiche la chaîne copiée dans le segment " |
| 704 |
"de mémoire partagée par « writer » :" |
| 705 |
|
| 706 |
#. type: Plain text |
| 707 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 708 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 709 |
#, no-wrap |
| 710 |
msgid "Hello, world\n" |
| 711 |
msgstr "Bonjour\n" |
| 712 |
|
| 713 |
#. type: SS |
| 714 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 715 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 716 |
#, no-wrap |
| 717 |
msgid "Program source: svshm_string.h" |
| 718 |
msgstr "Source du programme : svshm_string.h" |
| 719 |
|
| 720 |
#. type: Plain text |
| 721 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 722 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 723 |
msgid "" |
| 724 |
"The following header file is included by the \"reader\" and \"writer\" " |
| 725 |
"programs:" |
| 726 |
msgstr "" |
| 727 |
"Le fichier d'en-tête suivant est inclus dans les programmes « reader » et " |
| 728 |
"« writer » :" |
| 729 |
|
| 730 |
#. type: Plain text |
| 731 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 732 |
#: opensuse-tumbleweed |
| 733 |
#, fuzzy, no-wrap |
| 734 |
#| msgid "" |
| 735 |
#| "/* svshm_string.h\n" |
| 736 |
#| "\\&\n" |
| 737 |
#| " Licensed under GNU General Public License v2 or later.\n" |
| 738 |
#| "*/\n" |
| 739 |
#| "#ifndef SVSHM_STRING_H\n" |
| 740 |
#| "#define SVSHM_STRING_H\n" |
| 741 |
#| "\\&\n" |
| 742 |
#| "#include E<lt>stdio.hE<gt>\n" |
| 743 |
#| "#include E<lt>stdlib.hE<gt>\n" |
| 744 |
#| "#include E<lt>sys/sem.hE<gt>\n" |
| 745 |
#| "\\&\n" |
| 746 |
#| "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n" |
| 747 |
#| " } while (0)\n" |
| 748 |
#| "\\&\n" |
| 749 |
#| "union semun { /* Used in calls to semctl() */\n" |
| 750 |
#| " int val;\n" |
| 751 |
#| " struct semid_ds *buf;\n" |
| 752 |
#| " unsigned short *array;\n" |
| 753 |
#| "#if defined(__linux__)\n" |
| 754 |
#| " struct seminfo *__buf;\n" |
| 755 |
#| "#endif\n" |
| 756 |
#| "};\n" |
| 757 |
#| "\\&\n" |
| 758 |
#| "#define MEM_SIZE 4096\n" |
| 759 |
#| "\\&\n" |
| 760 |
#| "#endif // include guard\n" |
| 761 |
msgid "" |
| 762 |
"/* svshm_string.h\n" |
| 763 |
"\\&\n" |
| 764 |
" Licensed under GNU General Public License v2 or later.\n" |
| 765 |
"*/\n" |
| 766 |
"#ifndef SVSHM_STRING_H\n" |
| 767 |
"#define SVSHM_STRING_H\n" |
| 768 |
"\\&\n" |
| 769 |
"#include E<lt>err.hE<gt>\n" |
| 770 |
"#include E<lt>stdio.hE<gt>\n" |
| 771 |
"#include E<lt>stdlib.hE<gt>\n" |
| 772 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 773 |
"\\&\n" |
| 774 |
"union semun { /* Used in calls to semctl() */\n" |
| 775 |
" int val;\n" |
| 776 |
" struct semid_ds *buf;\n" |
| 777 |
" unsigned short *array;\n" |
| 778 |
"#if defined(__linux__)\n" |
| 779 |
" struct seminfo *__buf;\n" |
| 780 |
"#endif\n" |
| 781 |
"};\n" |
| 782 |
"\\&\n" |
| 783 |
"#define MEM_SIZE 4096\n" |
| 784 |
"\\&\n" |
| 785 |
"#endif // include guard\n" |
| 786 |
msgstr "" |
| 787 |
"/* svshm_string.h\n" |
| 788 |
"\\&\n" |
| 789 |
" Sous licence GNU General Public v2 ou postérieure.\n" |
| 790 |
"*/\n" |
| 791 |
"#ifndef SVSHM_STRING_H\n" |
| 792 |
"#define SVSHM_STRING_H\n" |
| 793 |
"\\&\n" |
| 794 |
"#include E<lt>stdio.hE<gt>\n" |
| 795 |
"#include E<lt>stdlib.hE<gt>\n" |
| 796 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 797 |
"\\&\n" |
| 798 |
"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n" |
| 799 |
" } while (0)\n" |
| 800 |
"\\&\n" |
| 801 |
"union semun { /* Utilisé dans les appels semctl() */\n" |
| 802 |
" int val;\n" |
| 803 |
" struct semid_ds *buf;\n" |
| 804 |
" unsigned short *array;\n" |
| 805 |
"#if defined(__linux__)\n" |
| 806 |
" struct seminfo *__buf;\n" |
| 807 |
"#endif\n" |
| 808 |
"};\n" |
| 809 |
"\\&\n" |
| 810 |
"#define MEM_SIZE 4096\n" |
| 811 |
"\\&\n" |
| 812 |
"#endif // include guard\n" |
| 813 |
|
| 814 |
#. type: SS |
| 815 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 816 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 817 |
#, no-wrap |
| 818 |
msgid "Program source: svshm_string_read.c" |
| 819 |
msgstr "Source du programme : svshm_string_read.c" |
| 820 |
|
| 821 |
#. type: Plain text |
| 822 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 823 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 824 |
msgid "" |
| 825 |
"The \"reader\" program creates a shared memory segment and a semaphore set " |
| 826 |
"containing one semaphore. It then attaches the shared memory object into " |
| 827 |
"its address space and initializes the semaphore value to 1. Finally, the " |
| 828 |
"program waits for the semaphore value to become 0, and afterwards prints the " |
| 829 |
"string that has been copied into the shared memory segment by the \"writer\"." |
| 830 |
msgstr "" |
| 831 |
"Le programme « reader » crée un segment de mémoire partagée et un ensemble " |
| 832 |
"de sémaphores contenant un sémaphore. Il attache ensuite l'objet en mémoire " |
| 833 |
"partagée à son espace d'adressage et initialise la valeur du sémaphore à " |
| 834 |
"B<1>. Enfin, il attend que la valeur du sémaphore devienne B<0>, après quoi " |
| 835 |
"il affiche la chaîne qui a été copiée dans le segment de mémoire partagée " |
| 836 |
"par « writer »." |
| 837 |
|
| 838 |
#. type: Plain text |
| 839 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 840 |
#: opensuse-tumbleweed |
| 841 |
#, fuzzy, no-wrap |
| 842 |
#| msgid "" |
| 843 |
#| "/* svshm_string_read.c\n" |
| 844 |
#| "\\&\n" |
| 845 |
#| " Licensed under GNU General Public License v2 or later.\n" |
| 846 |
#| "*/\n" |
| 847 |
#| "#include E<lt>stdio.hE<gt>\n" |
| 848 |
#| "#include E<lt>stdlib.hE<gt>\n" |
| 849 |
#| "#include E<lt>sys/ipc.hE<gt>\n" |
| 850 |
#| "#include E<lt>sys/sem.hE<gt>\n" |
| 851 |
#| "#include E<lt>sys/shm.hE<gt>\n" |
| 852 |
#| "\\&\n" |
| 853 |
#| "#include \"svshm_string.h\"\n" |
| 854 |
#| "\\&\n" |
| 855 |
#| "int\n" |
| 856 |
#| "main(void)\n" |
| 857 |
#| "{\n" |
| 858 |
#| " int semid, shmid;\n" |
| 859 |
#| " char *addr;\n" |
| 860 |
#| " union semun arg, dummy;\n" |
| 861 |
#| " struct sembuf sop;\n" |
| 862 |
#| "\\&\n" |
| 863 |
#| " /* Create shared memory and semaphore set containing one\n" |
| 864 |
#| " semaphore. */\n" |
| 865 |
#| "\\&\n" |
| 866 |
#| " shmid = shmget(IPC_PRIVATE, MEM_SIZE, IPC_CREAT | 0600);\n" |
| 867 |
#| " if (shmid == -1)\n" |
| 868 |
#| " errExit(\"shmget\");\n" |
| 869 |
#| "\\&\n" |
| 870 |
#| " semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);\n" |
| 871 |
#| " if (semid == -1)\n" |
| 872 |
#| " errExit(\"semget\");\n" |
| 873 |
#| "\\&\n" |
| 874 |
#| " /* Attach shared memory into our address space. */\n" |
| 875 |
#| "\\&\n" |
| 876 |
#| " addr = shmat(shmid, NULL, SHM_RDONLY);\n" |
| 877 |
#| " if (addr == (void *) -1)\n" |
| 878 |
#| " errExit(\"shmat\");\n" |
| 879 |
#| "\\&\n" |
| 880 |
#| " /* Initialize semaphore 0 in set with value 1. */\n" |
| 881 |
#| "\\&\n" |
| 882 |
#| " arg.val = 1;\n" |
| 883 |
#| " if (semctl(semid, 0, SETVAL, arg) == -1)\n" |
| 884 |
#| " errExit(\"semctl\");\n" |
| 885 |
#| "\\&\n" |
| 886 |
#| " printf(\"shmid = %d; semid = %d\\[rs]n\", shmid, semid);\n" |
| 887 |
#| "\\&\n" |
| 888 |
#| " /* Wait for semaphore value to become 0. */\n" |
| 889 |
#| "\\&\n" |
| 890 |
#| " sop.sem_num = 0;\n" |
| 891 |
#| " sop.sem_op = 0;\n" |
| 892 |
#| " sop.sem_flg = 0;\n" |
| 893 |
#| "\\&\n" |
| 894 |
#| " if (semop(semid, &sop, 1) == -1)\n" |
| 895 |
#| " errExit(\"semop\");\n" |
| 896 |
#| "\\&\n" |
| 897 |
#| " /* Print the string from shared memory. */\n" |
| 898 |
#| "\\&\n" |
| 899 |
#| " printf(\"%s\\[rs]n\", addr);\n" |
| 900 |
#| "\\&\n" |
| 901 |
#| " /* Remove shared memory and semaphore set. */\n" |
| 902 |
#| "\\&\n" |
| 903 |
#| " if (shmctl(shmid, IPC_RMID, NULL) == -1)\n" |
| 904 |
#| " errExit(\"shmctl\");\n" |
| 905 |
#| " if (semctl(semid, 0, IPC_RMID, dummy) == -1)\n" |
| 906 |
#| " errExit(\"semctl\");\n" |
| 907 |
#| "\\&\n" |
| 908 |
#| " exit(EXIT_SUCCESS);\n" |
| 909 |
#| "}\n" |
| 910 |
msgid "" |
| 911 |
"/* svshm_string_read.c\n" |
| 912 |
"\\&\n" |
| 913 |
" Licensed under GNU General Public License v2 or later.\n" |
| 914 |
"*/\n" |
| 915 |
"#include E<lt>err.hE<gt>\n" |
| 916 |
"#include E<lt>stdio.hE<gt>\n" |
| 917 |
"#include E<lt>stdlib.hE<gt>\n" |
| 918 |
"#include E<lt>sys/ipc.hE<gt>\n" |
| 919 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 920 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 921 |
"\\&\n" |
| 922 |
"#include \"svshm_string.h\"\n" |
| 923 |
"\\&\n" |
| 924 |
"int\n" |
| 925 |
"main(void)\n" |
| 926 |
"{\n" |
| 927 |
" int semid, shmid;\n" |
| 928 |
" char *addr;\n" |
| 929 |
" union semun arg, dummy;\n" |
| 930 |
" struct sembuf sop;\n" |
| 931 |
"\\&\n" |
| 932 |
" /* Create shared memory and semaphore set containing one\n" |
| 933 |
" semaphore. */\n" |
| 934 |
"\\&\n" |
| 935 |
" shmid = shmget(IPC_PRIVATE, MEM_SIZE, IPC_CREAT | 0600);\n" |
| 936 |
" if (shmid == -1)\n" |
| 937 |
" err(EXIT_FAILURE, \"shmget\");\n" |
| 938 |
"\\&\n" |
| 939 |
" semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);\n" |
| 940 |
" if (semid == -1)\n" |
| 941 |
" err(EXIT_FAILURE, \"semget\");\n" |
| 942 |
"\\&\n" |
| 943 |
" /* Attach shared memory into our address space. */\n" |
| 944 |
"\\&\n" |
| 945 |
" addr = shmat(shmid, NULL, SHM_RDONLY);\n" |
| 946 |
" if (addr == (void *) -1)\n" |
| 947 |
" err(EXIT_FAILURE, \"shmat\");\n" |
| 948 |
"\\&\n" |
| 949 |
" /* Initialize semaphore 0 in set with value 1. */\n" |
| 950 |
"\\&\n" |
| 951 |
" arg.val = 1;\n" |
| 952 |
" if (semctl(semid, 0, SETVAL, arg) == -1)\n" |
| 953 |
" err(EXIT_FAILURE, \"semctl\");\n" |
| 954 |
"\\&\n" |
| 955 |
" printf(\"shmid = %d\\[rs]n\", shmid);\n" |
| 956 |
" printf(\"semid = %d\\[rs]n\", semid);\n" |
| 957 |
"\\&\n" |
| 958 |
" /* Wait for semaphore value to become 0. */\n" |
| 959 |
"\\&\n" |
| 960 |
" sop.sem_num = 0;\n" |
| 961 |
" sop.sem_op = 0;\n" |
| 962 |
" sop.sem_flg = 0;\n" |
| 963 |
"\\&\n" |
| 964 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 965 |
" err(EXIT_FAILURE, \"semop\");\n" |
| 966 |
"\\&\n" |
| 967 |
" /* Print the string from shared memory. */\n" |
| 968 |
"\\&\n" |
| 969 |
" printf(\"%s\\[rs]n\", addr);\n" |
| 970 |
"\\&\n" |
| 971 |
" /* Remove shared memory and semaphore set. */\n" |
| 972 |
"\\&\n" |
| 973 |
" if (shmctl(shmid, IPC_RMID, NULL) == -1)\n" |
| 974 |
" err(EXIT_FAILURE, \"shmctl\");\n" |
| 975 |
" if (semctl(semid, 0, IPC_RMID, dummy) == -1)\n" |
| 976 |
" err(EXIT_FAILURE, \"semctl\");\n" |
| 977 |
"\\&\n" |
| 978 |
" exit(EXIT_SUCCESS);\n" |
| 979 |
"}\n" |
| 980 |
msgstr "" |
| 981 |
"/* svshm_string_read.c\n" |
| 982 |
"\\&\n" |
| 983 |
" Sous licence GNU General Public v2 ou postérieure.\n" |
| 984 |
"*/\n" |
| 985 |
"#include E<lt>stdio.hE<gt>\n" |
| 986 |
"#include E<lt>stdlib.hE<gt>\n" |
| 987 |
"#include E<lt>sys/ipc.hE<gt>\n" |
| 988 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 989 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 990 |
"\\&\n" |
| 991 |
"#include \"svshm_string.h\"\n" |
| 992 |
"\\&\n" |
| 993 |
"int\n" |
| 994 |
"main(void)\n" |
| 995 |
"{\n" |
| 996 |
" int semid, shmid;\n" |
| 997 |
" char *addr;\n" |
| 998 |
" union semun arg, dummy;\n" |
| 999 |
" struct sembuf sop;\n" |
| 1000 |
"\\&\n" |
| 1001 |
" /* Créer la mémoire partagée et le jeu de sémaphores contenant\n" |
| 1002 |
" un sémaphore. */\n" |
| 1003 |
"\\&\n" |
| 1004 |
" shmid = shmget(IPC_PRIVATE, MEM_SIZE, IPC_CREAT | 0600);\n" |
| 1005 |
" if (shmid == -1)\n" |
| 1006 |
" errExit(\"shmget\");\n" |
| 1007 |
"\\&\n" |
| 1008 |
" semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);\n" |
| 1009 |
" if (semid == -1)\n" |
| 1010 |
" errExit(\"semget\");\n" |
| 1011 |
"\\&\n" |
| 1012 |
" /*Attacher la mémoire partagée à notre espace d'adressage. */\n" |
| 1013 |
"\\&\n" |
| 1014 |
" addr = shmat(shmid, NULL, SHM_RDONLY);\n" |
| 1015 |
" if (addr == (void *) -1)\n" |
| 1016 |
" errExit(\"shmat\");\n" |
| 1017 |
"\\&\n" |
| 1018 |
" /* Initialiser le sémaphore B<0> du jeu à la valeur B<1>. */\n" |
| 1019 |
"\\&\n" |
| 1020 |
" arg.val = 1;\n" |
| 1021 |
" if (semctl(semid, 0, SETVAL, arg) == -1)\n" |
| 1022 |
" errExit(\"semctl\");\n" |
| 1023 |
"\\&\n" |
| 1024 |
" printf(\"shmid = %d; semid = %d\\[rs]n\", shmid, semid);\n" |
| 1025 |
"\\&\n" |
| 1026 |
" /* Attendre que la valeur du sémaphore devienne B<0>. */\n" |
| 1027 |
"\\&\n" |
| 1028 |
" sop.sem_num = 0;\n" |
| 1029 |
" sop.sem_op = 0;\n" |
| 1030 |
" sop.sem_flg = 0;\n" |
| 1031 |
"\\&\n" |
| 1032 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1033 |
" errExit(\"semop\");\n" |
| 1034 |
"\\&\n" |
| 1035 |
" /* Afficher la chaîne à partir de la mémoire partagée. */\n" |
| 1036 |
"\\&\n" |
| 1037 |
" printf(\"%s\\[rs]n\", addr);\n" |
| 1038 |
"\\&\n" |
| 1039 |
" /* Supprimer la mémoire partagée et le jeu de sémaphores. */\n" |
| 1040 |
"\\&\n" |
| 1041 |
" if (shmctl(shmid, IPC_RMID, NULL) == -1)\n" |
| 1042 |
" errExit(\"shmctl\");\n" |
| 1043 |
" if (semctl(semid, 0, IPC_RMID, dummy) == -1)\n" |
| 1044 |
" errExit(\"semctl\");\n" |
| 1045 |
"\\&\n" |
| 1046 |
" exit(EXIT_SUCCESS);\n" |
| 1047 |
"}\n" |
| 1048 |
|
| 1049 |
#. type: SS |
| 1050 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1051 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1052 |
#, no-wrap |
| 1053 |
msgid "Program source: svshm_string_write.c" |
| 1054 |
msgstr "Source du programme : svshm_string_write.c" |
| 1055 |
|
| 1056 |
#. type: Plain text |
| 1057 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1058 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1059 |
msgid "" |
| 1060 |
"The writer program takes three command-line arguments: the IDs of the shared " |
| 1061 |
"memory segment and semaphore set that have already been created by the " |
| 1062 |
"\"reader\", and a string. It attaches the shared memory segment into its " |
| 1063 |
"address space, and then decrements the semaphore value to 0 in order to " |
| 1064 |
"inform the \"reader\" that it can now examine the contents of the shared " |
| 1065 |
"memory." |
| 1066 |
msgstr "" |
| 1067 |
"Le programme « writer » prend trois paramètres en ligne de commande : les " |
| 1068 |
"identifiants du segment de mémoire partagée et du jeu de sémaphore créés par " |
| 1069 |
"« reader » et une chaîne. Il attache le segment de mémoire partagée à son " |
| 1070 |
"espace d'adressage, puis décrémente la valeur du sémaphore à B<0> pour " |
| 1071 |
"informer « reader » qu'il peut examiner le contenu de la mémoire partagée." |
| 1072 |
|
| 1073 |
#. type: Plain text |
| 1074 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1075 |
#: opensuse-tumbleweed |
| 1076 |
#, fuzzy, no-wrap |
| 1077 |
#| msgid "" |
| 1078 |
#| "/* svshm_string_write.c\n" |
| 1079 |
#| "\\&\n" |
| 1080 |
#| " Licensed under GNU General Public License v2 or later.\n" |
| 1081 |
#| "*/\n" |
| 1082 |
#| "#include E<lt>stdio.hE<gt>\n" |
| 1083 |
#| "#include E<lt>stdlib.hE<gt>\n" |
| 1084 |
#| "#include E<lt>string.hE<gt>\n" |
| 1085 |
#| "#include E<lt>sys/sem.hE<gt>\n" |
| 1086 |
#| "#include E<lt>sys/shm.hE<gt>\n" |
| 1087 |
#| "\\&\n" |
| 1088 |
#| "#include \"svshm_string.h\"\n" |
| 1089 |
#| "\\&\n" |
| 1090 |
#| "int\n" |
| 1091 |
#| "main(int argc, char *argv[])\n" |
| 1092 |
#| "{\n" |
| 1093 |
#| " int semid, shmid;\n" |
| 1094 |
#| " char *addr;\n" |
| 1095 |
#| " size_t size;\n" |
| 1096 |
#| " struct sembuf sop;\n" |
| 1097 |
#| "\\&\n" |
| 1098 |
#| " if (argc != 4) {\n" |
| 1099 |
#| " fprintf(stderr, \"Usage: %s shmid semid string\\[rs]n\", argv[0]);\n" |
| 1100 |
#| " exit(EXIT_FAILURE);\n" |
| 1101 |
#| " }\n" |
| 1102 |
#| "\\&\n" |
| 1103 |
#| " size = strlen(argv[3]) + 1; /* +1 to include trailing \\[aq]\\[rs]0\\[aq] */\n" |
| 1104 |
#| " if (size E<gt> MEM_SIZE) {\n" |
| 1105 |
#| " fprintf(stderr, \"String is too big!\\[rs]n\");\n" |
| 1106 |
#| " exit(EXIT_FAILURE);\n" |
| 1107 |
#| " }\n" |
| 1108 |
#| "\\&\n" |
| 1109 |
#| " /* Get object IDs from command-line. */\n" |
| 1110 |
#| "\\&\n" |
| 1111 |
#| " shmid = atoi(argv[1]);\n" |
| 1112 |
#| " semid = atoi(argv[2]);\n" |
| 1113 |
#| "\\&\n" |
| 1114 |
#| " /* Attach shared memory into our address space and copy string\n" |
| 1115 |
#| " (including trailing null byte) into memory. */\n" |
| 1116 |
#| "\\&\n" |
| 1117 |
#| " addr = shmat(shmid, NULL, 0);\n" |
| 1118 |
#| " if (addr == (void *) -1)\n" |
| 1119 |
#| " errExit(\"shmat\");\n" |
| 1120 |
#| "\\&\n" |
| 1121 |
#| " memcpy(addr, argv[3], size);\n" |
| 1122 |
#| "\\&\n" |
| 1123 |
#| " /* Decrement semaphore to 0. */\n" |
| 1124 |
#| "\\&\n" |
| 1125 |
#| " sop.sem_num = 0;\n" |
| 1126 |
#| " sop.sem_op = -1;\n" |
| 1127 |
#| " sop.sem_flg = 0;\n" |
| 1128 |
#| "\\&\n" |
| 1129 |
#| " if (semop(semid, &sop, 1) == -1)\n" |
| 1130 |
#| " errExit(\"semop\");\n" |
| 1131 |
#| "\\&\n" |
| 1132 |
#| " exit(EXIT_SUCCESS);\n" |
| 1133 |
#| "}\n" |
| 1134 |
msgid "" |
| 1135 |
"/* svshm_string_write.c\n" |
| 1136 |
"\\&\n" |
| 1137 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1138 |
"*/\n" |
| 1139 |
"#include E<lt>err.hE<gt>\n" |
| 1140 |
"#include E<lt>stdio.hE<gt>\n" |
| 1141 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1142 |
"#include E<lt>string.hE<gt>\n" |
| 1143 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1144 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 1145 |
"\\&\n" |
| 1146 |
"#include \"svshm_string.h\"\n" |
| 1147 |
"\\&\n" |
| 1148 |
"int\n" |
| 1149 |
"main(int argc, char *argv[])\n" |
| 1150 |
"{\n" |
| 1151 |
" int semid, shmid;\n" |
| 1152 |
" char *addr;\n" |
| 1153 |
" size_t size;\n" |
| 1154 |
" struct sembuf sop;\n" |
| 1155 |
"\\&\n" |
| 1156 |
" if (argc != 4) {\n" |
| 1157 |
" fprintf(stderr, \"Usage: %s shmid semid string\\[rs]n\", argv[0]);\n" |
| 1158 |
" exit(EXIT_FAILURE);\n" |
| 1159 |
" }\n" |
| 1160 |
"\\&\n" |
| 1161 |
" size = strlen(argv[3]) + 1; /* +1 to include trailing \\[aq]\\[rs]0\\[aq] */\n" |
| 1162 |
" if (size E<gt> MEM_SIZE) {\n" |
| 1163 |
" fprintf(stderr, \"String is too big!\\[rs]n\");\n" |
| 1164 |
" exit(EXIT_FAILURE);\n" |
| 1165 |
" }\n" |
| 1166 |
"\\&\n" |
| 1167 |
" /* Get object IDs from command-line. */\n" |
| 1168 |
"\\&\n" |
| 1169 |
" shmid = atoi(argv[1]);\n" |
| 1170 |
" semid = atoi(argv[2]);\n" |
| 1171 |
"\\&\n" |
| 1172 |
" /* Attach shared memory into our address space and copy string\n" |
| 1173 |
" (including trailing null byte) into memory. */\n" |
| 1174 |
"\\&\n" |
| 1175 |
" addr = shmat(shmid, NULL, 0);\n" |
| 1176 |
" if (addr == (void *) -1)\n" |
| 1177 |
" err(EXIT_FAILURE, \"shmat\");\n" |
| 1178 |
"\\&\n" |
| 1179 |
" memcpy(addr, argv[3], size);\n" |
| 1180 |
"\\&\n" |
| 1181 |
" /* Decrement semaphore to 0. */\n" |
| 1182 |
"\\&\n" |
| 1183 |
" sop.sem_num = 0;\n" |
| 1184 |
" sop.sem_op = -1;\n" |
| 1185 |
" sop.sem_flg = 0;\n" |
| 1186 |
"\\&\n" |
| 1187 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1188 |
" err(EXIT_FAILURE, \"semop\");\n" |
| 1189 |
"\\&\n" |
| 1190 |
" exit(EXIT_SUCCESS);\n" |
| 1191 |
"}\n" |
| 1192 |
msgstr "" |
| 1193 |
"/* svshm_string_write.c\n" |
| 1194 |
"\\&\n" |
| 1195 |
" Sous licence GNU General Public v2 ou postérieure.\n" |
| 1196 |
"*/\n" |
| 1197 |
"#include E<lt>stdio.hE<gt>\n" |
| 1198 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1199 |
"#include E<lt>string.hE<gt>\n" |
| 1200 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1201 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 1202 |
"\\&\n" |
| 1203 |
"#include \"svshm_string.h\"\n" |
| 1204 |
"\\&\n" |
| 1205 |
"int\n" |
| 1206 |
"main(int argc, char *argv[])\n" |
| 1207 |
"{\n" |
| 1208 |
" int semid, shmid;\n" |
| 1209 |
" char *addr;\n" |
| 1210 |
" size_t len;\n" |
| 1211 |
" struct sembuf sop;\n" |
| 1212 |
"\\&\n" |
| 1213 |
" if (argc != 4) {\n" |
| 1214 |
" fprintf(stderr, \"Utilisation : %s shmid semid string\\[rs]n\", argv[0]);\n" |
| 1215 |
" exit(EXIT_FAILURE);\n" |
| 1216 |
" }\n" |
| 1217 |
"\\&\n" |
| 1218 |
" len = strlen(argv[3]) + 1; /* +1 pour inclure le \\[aq]\\[rs]0\\[aq] final */\n" |
| 1219 |
" if (len E<gt> MEM_SIZE) {\n" |
| 1220 |
" fprintf(stderr, \"La chaîne est trop longue\\ !\\[rs]n\");\n" |
| 1221 |
" exit(EXIT_FAILURE);\n" |
| 1222 |
" }\n" |
| 1223 |
"\\&\n" |
| 1224 |
" /* Obtenir les identifiants de l'objet depuis la ligne de commande. */\n" |
| 1225 |
"\\&\n" |
| 1226 |
" shmid = atoi(argv[1]);\n" |
| 1227 |
" semid = atoi(argv[2]);\n" |
| 1228 |
"\\&\n" |
| 1229 |
" /* Attacher la mémoire partagée dans notre espace d'adressage et copier\n" |
| 1230 |
" la chaîne (et notamment l'octet NULL final) dans la mémoire. */\n" |
| 1231 |
"\\&\n" |
| 1232 |
" addr = shmat(shmid, NULL, 0);\n" |
| 1233 |
" if (addr == (void *) -1)\n" |
| 1234 |
" errExit(\"shmat\");\n" |
| 1235 |
"\\&\n" |
| 1236 |
" memcpy(addr, argv[3], len);\n" |
| 1237 |
"\\&\n" |
| 1238 |
" /* Décrémenter le sémaphore à B<0> */\n" |
| 1239 |
"\\&\n" |
| 1240 |
" sop.sem_num = 0;\n" |
| 1241 |
" sop.sem_op = -1;\n" |
| 1242 |
" sop.sem_flg = 0;\n" |
| 1243 |
"\\&\n" |
| 1244 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1245 |
" errExit(\"semop\");\n" |
| 1246 |
"\\&\n" |
| 1247 |
" exit(EXIT_SUCCESS);\n" |
| 1248 |
"}\n" |
| 1249 |
|
| 1250 |
#. type: SH |
| 1251 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1252 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1253 |
#, no-wrap |
| 1254 |
msgid "SEE ALSO" |
| 1255 |
msgstr "VOIR AUSSI" |
| 1256 |
|
| 1257 |
#. type: Plain text |
| 1258 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1259 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1260 |
msgid "" |
| 1261 |
"B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), " |
| 1262 |
"B<shm_overview>(7), B<sysvipc>(7)" |
| 1263 |
msgstr "" |
| 1264 |
"B<brk>(2), B<mmap>(2), B<shmctl>(2), B<shmget>(2), B<capabilities>(7), " |
| 1265 |
"B<shm_overview>(7), B<sysvipc>(7)" |
| 1266 |
|
| 1267 |
#. type: TH |
| 1268 |
#: debian-trixie |
| 1269 |
#, no-wrap |
| 1270 |
msgid "2024-06-15" |
| 1271 |
msgstr "15 juin 2024" |
| 1272 |
|
| 1273 |
#. type: TH |
| 1274 |
#: debian-trixie |
| 1275 |
#, no-wrap |
| 1276 |
msgid "Linux man-pages 6.9.1" |
| 1277 |
msgstr "Pages du manuel de Linux 6.9.1" |
| 1278 |
|
| 1279 |
#. type: Plain text |
| 1280 |
#: debian-trixie |
| 1281 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 1282 |
msgstr "Bibliothèque C standard (I<libc>, I<-lc>)" |
| 1283 |
|
| 1284 |
#. type: Plain text |
| 1285 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1286 |
msgid "" |
| 1287 |
"Invalid I<shmid> value, unaligned (i.e., not page-aligned and B<SHM_RND> was " |
| 1288 |
"not specified) or invalid I<shmaddr> value, or can't attach segment at " |
| 1289 |
"I<shmaddr>, or B<SHM_REMAP> was specified and I<shmaddr> was NULL." |
| 1290 |
msgstr "" |
| 1291 |
"La valeur I<shmid> n'est pas valable, mal alignée (c'est-à-dire pas alignée " |
| 1292 |
"sur une page et B<SHM_RND> n'a pas été précisé) ou la valeur I<shmaddr> " |
| 1293 |
"n'est pas valable, ou ne peut pas être attaché à I<shmaddr>, ou B<SHM_REMAP> " |
| 1294 |
"a été réclamé et I<shmaddr> est B<NULL>." |
| 1295 |
|
| 1296 |
#. type: Plain text |
| 1297 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1298 |
#, no-wrap |
| 1299 |
msgid "" |
| 1300 |
"$ B<./svshm_string_read>\n" |
| 1301 |
"shmid = 1114194; semid = 15\n" |
| 1302 |
msgstr "" |
| 1303 |
"$ B<./svshm_string_read>\n" |
| 1304 |
"shmid = 1114194; semid = 15\n" |
| 1305 |
|
| 1306 |
#. type: Plain text |
| 1307 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1308 |
#, no-wrap |
| 1309 |
msgid "$ B<./svshm_string_write 1114194 15 \\[aq]Hello, world\\[aq]>\n" |
| 1310 |
msgstr "$ B<./svshm_string_write 1114194 15 \\[aq]Bonjour\\[aq]>\n" |
| 1311 |
|
| 1312 |
#. type: Plain text |
| 1313 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1314 |
#, no-wrap |
| 1315 |
msgid "" |
| 1316 |
"/* svshm_string.h\n" |
| 1317 |
"\\&\n" |
| 1318 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1319 |
"*/\n" |
| 1320 |
"#ifndef SVSHM_STRING_H\n" |
| 1321 |
"#define SVSHM_STRING_H\n" |
| 1322 |
"\\&\n" |
| 1323 |
"#include E<lt>stdio.hE<gt>\n" |
| 1324 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1325 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1326 |
"\\&\n" |
| 1327 |
"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n" |
| 1328 |
" } while (0)\n" |
| 1329 |
"\\&\n" |
| 1330 |
"union semun { /* Used in calls to semctl() */\n" |
| 1331 |
" int val;\n" |
| 1332 |
" struct semid_ds *buf;\n" |
| 1333 |
" unsigned short *array;\n" |
| 1334 |
"#if defined(__linux__)\n" |
| 1335 |
" struct seminfo *__buf;\n" |
| 1336 |
"#endif\n" |
| 1337 |
"};\n" |
| 1338 |
"\\&\n" |
| 1339 |
"#define MEM_SIZE 4096\n" |
| 1340 |
"\\&\n" |
| 1341 |
"#endif // include guard\n" |
| 1342 |
msgstr "" |
| 1343 |
"/* svshm_string.h\n" |
| 1344 |
"\\&\n" |
| 1345 |
" Sous licence GNU General Public v2 ou postérieure.\n" |
| 1346 |
"*/\n" |
| 1347 |
"#ifndef SVSHM_STRING_H\n" |
| 1348 |
"#define SVSHM_STRING_H\n" |
| 1349 |
"\\&\n" |
| 1350 |
"#include E<lt>stdio.hE<gt>\n" |
| 1351 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1352 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1353 |
"\\&\n" |
| 1354 |
"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n" |
| 1355 |
" } while (0)\n" |
| 1356 |
"\\&\n" |
| 1357 |
"union semun { /* Utilisé dans les appels semctl() */\n" |
| 1358 |
" int val;\n" |
| 1359 |
" struct semid_ds *buf;\n" |
| 1360 |
" unsigned short *array;\n" |
| 1361 |
"#if defined(__linux__)\n" |
| 1362 |
" struct seminfo *__buf;\n" |
| 1363 |
"#endif\n" |
| 1364 |
"};\n" |
| 1365 |
"\\&\n" |
| 1366 |
"#define MEM_SIZE 4096\n" |
| 1367 |
"\\&\n" |
| 1368 |
"#endif // include guard\n" |
| 1369 |
|
| 1370 |
#. type: Plain text |
| 1371 |
#: debian-trixie fedora-44 fedora-rawhide |
| 1372 |
#, no-wrap |
| 1373 |
msgid "" |
| 1374 |
"/* svshm_string_read.c\n" |
| 1375 |
"\\&\n" |
| 1376 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1377 |
"*/\n" |
| 1378 |
"#include E<lt>stdio.hE<gt>\n" |
| 1379 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1380 |
"#include E<lt>sys/ipc.hE<gt>\n" |
| 1381 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1382 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 1383 |
"\\&\n" |
| 1384 |
"#include \"svshm_string.h\"\n" |
| 1385 |
"\\&\n" |
| 1386 |
"int\n" |
| 1387 |
"main(void)\n" |
| 1388 |
"{\n" |
| 1389 |
" int semid, shmid;\n" |
| 1390 |
" char *addr;\n" |
| 1391 |
" union semun arg, dummy;\n" |
| 1392 |
" struct sembuf sop;\n" |
| 1393 |
"\\&\n" |
| 1394 |
" /* Create shared memory and semaphore set containing one\n" |
| 1395 |
" semaphore. */\n" |
| 1396 |
"\\&\n" |
| 1397 |
" shmid = shmget(IPC_PRIVATE, MEM_SIZE, IPC_CREAT | 0600);\n" |
| 1398 |
" if (shmid == -1)\n" |
| 1399 |
" errExit(\"shmget\");\n" |
| 1400 |
"\\&\n" |
| 1401 |
" semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);\n" |
| 1402 |
" if (semid == -1)\n" |
| 1403 |
" errExit(\"semget\");\n" |
| 1404 |
"\\&\n" |
| 1405 |
" /* Attach shared memory into our address space. */\n" |
| 1406 |
"\\&\n" |
| 1407 |
" addr = shmat(shmid, NULL, SHM_RDONLY);\n" |
| 1408 |
" if (addr == (void *) -1)\n" |
| 1409 |
" errExit(\"shmat\");\n" |
| 1410 |
"\\&\n" |
| 1411 |
" /* Initialize semaphore 0 in set with value 1. */\n" |
| 1412 |
"\\&\n" |
| 1413 |
" arg.val = 1;\n" |
| 1414 |
" if (semctl(semid, 0, SETVAL, arg) == -1)\n" |
| 1415 |
" errExit(\"semctl\");\n" |
| 1416 |
"\\&\n" |
| 1417 |
" printf(\"shmid = %d; semid = %d\\[rs]n\", shmid, semid);\n" |
| 1418 |
"\\&\n" |
| 1419 |
" /* Wait for semaphore value to become 0. */\n" |
| 1420 |
"\\&\n" |
| 1421 |
" sop.sem_num = 0;\n" |
| 1422 |
" sop.sem_op = 0;\n" |
| 1423 |
" sop.sem_flg = 0;\n" |
| 1424 |
"\\&\n" |
| 1425 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1426 |
" errExit(\"semop\");\n" |
| 1427 |
"\\&\n" |
| 1428 |
" /* Print the string from shared memory. */\n" |
| 1429 |
"\\&\n" |
| 1430 |
" printf(\"%s\\[rs]n\", addr);\n" |
| 1431 |
"\\&\n" |
| 1432 |
" /* Remove shared memory and semaphore set. */\n" |
| 1433 |
"\\&\n" |
| 1434 |
" if (shmctl(shmid, IPC_RMID, NULL) == -1)\n" |
| 1435 |
" errExit(\"shmctl\");\n" |
| 1436 |
" if (semctl(semid, 0, IPC_RMID, dummy) == -1)\n" |
| 1437 |
" errExit(\"semctl\");\n" |
| 1438 |
"\\&\n" |
| 1439 |
" exit(EXIT_SUCCESS);\n" |
| 1440 |
"}\n" |
| 1441 |
msgstr "" |
| 1442 |
"/* svshm_string_read.c\n" |
| 1443 |
"\\&\n" |
| 1444 |
" Sous licence GNU General Public v2 ou postérieure.\n" |
| 1445 |
"*/\n" |
| 1446 |
"#include E<lt>stdio.hE<gt>\n" |
| 1447 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1448 |
"#include E<lt>sys/ipc.hE<gt>\n" |
| 1449 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1450 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 1451 |
"\\&\n" |
| 1452 |
"#include \"svshm_string.h\"\n" |
| 1453 |
"\\&\n" |
| 1454 |
"int\n" |
| 1455 |
"main(void)\n" |
| 1456 |
"{\n" |
| 1457 |
" int semid, shmid;\n" |
| 1458 |
" char *addr;\n" |
| 1459 |
" union semun arg, dummy;\n" |
| 1460 |
" struct sembuf sop;\n" |
| 1461 |
"\\&\n" |
| 1462 |
" /* Créer la mémoire partagée et le jeu de sémaphores contenant\n" |
| 1463 |
" un sémaphore. */\n" |
| 1464 |
"\\&\n" |
| 1465 |
" shmid = shmget(IPC_PRIVATE, MEM_SIZE, IPC_CREAT | 0600);\n" |
| 1466 |
" if (shmid == -1)\n" |
| 1467 |
" errExit(\"shmget\");\n" |
| 1468 |
"\\&\n" |
| 1469 |
" semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);\n" |
| 1470 |
" if (semid == -1)\n" |
| 1471 |
" errExit(\"semget\");\n" |
| 1472 |
"\\&\n" |
| 1473 |
" /*Attacher la mémoire partagée à notre espace d'adressage. */\n" |
| 1474 |
"\\&\n" |
| 1475 |
" addr = shmat(shmid, NULL, SHM_RDONLY);\n" |
| 1476 |
" if (addr == (void *) -1)\n" |
| 1477 |
" errExit(\"shmat\");\n" |
| 1478 |
"\\&\n" |
| 1479 |
" /* Initialiser le sémaphore B<0> du jeu à la valeur B<1>. */\n" |
| 1480 |
"\\&\n" |
| 1481 |
" arg.val = 1;\n" |
| 1482 |
" if (semctl(semid, 0, SETVAL, arg) == -1)\n" |
| 1483 |
" errExit(\"semctl\");\n" |
| 1484 |
"\\&\n" |
| 1485 |
" printf(\"shmid = %d; semid = %d\\[rs]n\", shmid, semid);\n" |
| 1486 |
"\\&\n" |
| 1487 |
" /* Attendre que la valeur du sémaphore devienne B<0>. */\n" |
| 1488 |
"\\&\n" |
| 1489 |
" sop.sem_num = 0;\n" |
| 1490 |
" sop.sem_op = 0;\n" |
| 1491 |
" sop.sem_flg = 0;\n" |
| 1492 |
"\\&\n" |
| 1493 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1494 |
" errExit(\"semop\");\n" |
| 1495 |
"\\&\n" |
| 1496 |
" /* Afficher la chaîne à partir de la mémoire partagée. */\n" |
| 1497 |
"\\&\n" |
| 1498 |
" printf(\"%s\\[rs]n\", addr);\n" |
| 1499 |
"\\&\n" |
| 1500 |
" /* Supprimer la mémoire partagée et le jeu de sémaphores. */\n" |
| 1501 |
"\\&\n" |
| 1502 |
" if (shmctl(shmid, IPC_RMID, NULL) == -1)\n" |
| 1503 |
" errExit(\"shmctl\");\n" |
| 1504 |
" if (semctl(semid, 0, IPC_RMID, dummy) == -1)\n" |
| 1505 |
" errExit(\"semctl\");\n" |
| 1506 |
"\\&\n" |
| 1507 |
" exit(EXIT_SUCCESS);\n" |
| 1508 |
"}\n" |
| 1509 |
|
| 1510 |
#. type: Plain text |
| 1511 |
#: debian-trixie |
| 1512 |
#, no-wrap |
| 1513 |
msgid "" |
| 1514 |
"/* svshm_string_write.c\n" |
| 1515 |
"\\&\n" |
| 1516 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1517 |
"*/\n" |
| 1518 |
"#include E<lt>stdio.hE<gt>\n" |
| 1519 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1520 |
"#include E<lt>string.hE<gt>\n" |
| 1521 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1522 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 1523 |
"\\&\n" |
| 1524 |
"#include \"svshm_string.h\"\n" |
| 1525 |
"\\&\n" |
| 1526 |
"int\n" |
| 1527 |
"main(int argc, char *argv[])\n" |
| 1528 |
"{\n" |
| 1529 |
" int semid, shmid;\n" |
| 1530 |
" char *addr;\n" |
| 1531 |
" size_t len;\n" |
| 1532 |
" struct sembuf sop;\n" |
| 1533 |
"\\&\n" |
| 1534 |
" if (argc != 4) {\n" |
| 1535 |
" fprintf(stderr, \"Usage: %s shmid semid string\\[rs]n\", argv[0]);\n" |
| 1536 |
" exit(EXIT_FAILURE);\n" |
| 1537 |
" }\n" |
| 1538 |
"\\&\n" |
| 1539 |
" len = strlen(argv[3]) + 1; /* +1 to include trailing \\[aq]\\[rs]0\\[aq] */\n" |
| 1540 |
" if (len E<gt> MEM_SIZE) {\n" |
| 1541 |
" fprintf(stderr, \"String is too big!\\[rs]n\");\n" |
| 1542 |
" exit(EXIT_FAILURE);\n" |
| 1543 |
" }\n" |
| 1544 |
"\\&\n" |
| 1545 |
" /* Get object IDs from command-line. */\n" |
| 1546 |
"\\&\n" |
| 1547 |
" shmid = atoi(argv[1]);\n" |
| 1548 |
" semid = atoi(argv[2]);\n" |
| 1549 |
"\\&\n" |
| 1550 |
" /* Attach shared memory into our address space and copy string\n" |
| 1551 |
" (including trailing null byte) into memory. */\n" |
| 1552 |
"\\&\n" |
| 1553 |
" addr = shmat(shmid, NULL, 0);\n" |
| 1554 |
" if (addr == (void *) -1)\n" |
| 1555 |
" errExit(\"shmat\");\n" |
| 1556 |
"\\&\n" |
| 1557 |
" memcpy(addr, argv[3], len);\n" |
| 1558 |
"\\&\n" |
| 1559 |
" /* Decrement semaphore to 0. */\n" |
| 1560 |
"\\&\n" |
| 1561 |
" sop.sem_num = 0;\n" |
| 1562 |
" sop.sem_op = -1;\n" |
| 1563 |
" sop.sem_flg = 0;\n" |
| 1564 |
"\\&\n" |
| 1565 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1566 |
" errExit(\"semop\");\n" |
| 1567 |
"\\&\n" |
| 1568 |
" exit(EXIT_SUCCESS);\n" |
| 1569 |
"}\n" |
| 1570 |
msgstr "" |
| 1571 |
"/* svshm_string_write.c\n" |
| 1572 |
"\\&\n" |
| 1573 |
" Sous licence GNU General Public v2 ou postérieure.\n" |
| 1574 |
"*/\n" |
| 1575 |
"#include E<lt>stdio.hE<gt>\n" |
| 1576 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1577 |
"#include E<lt>string.hE<gt>\n" |
| 1578 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1579 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 1580 |
"\\&\n" |
| 1581 |
"#include \"svshm_string.h\"\n" |
| 1582 |
"\\&\n" |
| 1583 |
"int\n" |
| 1584 |
"main(int argc, char *argv[])\n" |
| 1585 |
"{\n" |
| 1586 |
" int semid, shmid;\n" |
| 1587 |
" char *addr;\n" |
| 1588 |
" size_t size;\n" |
| 1589 |
" struct sembuf sop;\n" |
| 1590 |
"\\&\n" |
| 1591 |
" if (argc != 4) {\n" |
| 1592 |
" fprintf(stderr, \"Utilisation : %s shmid semid string\\[rs]n\", argv[0]);\n" |
| 1593 |
" exit(EXIT_FAILURE);\n" |
| 1594 |
" }\n" |
| 1595 |
"\\&\n" |
| 1596 |
" size = strlen(argv[3]) + 1; /* +1 pour inclure le \\[aq]\\[rs]0\\[aq] final */\n" |
| 1597 |
" if (size E<gt> MEM_SIZE) {\n" |
| 1598 |
" fprintf(stderr, \"La chaîne est trop longue\\ !\\[rs]n\");\n" |
| 1599 |
" exit(EXIT_FAILURE);\n" |
| 1600 |
" }\n" |
| 1601 |
"\\&\n" |
| 1602 |
" /* Obtenir les identifiants de l'objet depuis la ligne de commande. */\n" |
| 1603 |
"\\&\n" |
| 1604 |
" shmid = atoi(argv[1]);\n" |
| 1605 |
" semid = atoi(argv[2]);\n" |
| 1606 |
"\\&\n" |
| 1607 |
" /* Attacher la mémoire partagée dans notre espace d'adressage et copier\n" |
| 1608 |
" la chaîne (et notamment l'octet NULL final) dans la mémoire. */\n" |
| 1609 |
"\\&\n" |
| 1610 |
" addr = shmat(shmid, NULL, 0);\n" |
| 1611 |
" if (addr == (void *) -1)\n" |
| 1612 |
" errExit(\"shmat\");\n" |
| 1613 |
"\\&\n" |
| 1614 |
" memcpy(addr, argv[3], size);\n" |
| 1615 |
"\\&\n" |
| 1616 |
" /* Décrémenter le sémaphore à B<0> */\n" |
| 1617 |
"\\&\n" |
| 1618 |
" sop.sem_num = 0;\n" |
| 1619 |
" sop.sem_op = -1;\n" |
| 1620 |
" sop.sem_flg = 0;\n" |
| 1621 |
"\\&\n" |
| 1622 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1623 |
" errExit(\"semop\");\n" |
| 1624 |
"\\&\n" |
| 1625 |
" exit(EXIT_SUCCESS);\n" |
| 1626 |
"}\n" |
| 1627 |
|
| 1628 |
#. type: TH |
| 1629 |
#: fedora-44 fedora-rawhide |
| 1630 |
#, no-wrap |
| 1631 |
msgid "2024-11-17" |
| 1632 |
msgstr "17 novembre 2024" |
| 1633 |
|
| 1634 |
#. type: TH |
| 1635 |
#: fedora-44 fedora-rawhide |
| 1636 |
#, no-wrap |
| 1637 |
msgid "Linux man-pages 6.13" |
| 1638 |
msgstr "Pages du manuel de Linux 6.13" |
| 1639 |
|
| 1640 |
#. type: Plain text |
| 1641 |
#: fedora-44 fedora-rawhide |
| 1642 |
#, no-wrap |
| 1643 |
msgid "" |
| 1644 |
"/* svshm_string_write.c\n" |
| 1645 |
"\\&\n" |
| 1646 |
" Licensed under GNU General Public License v2 or later.\n" |
| 1647 |
"*/\n" |
| 1648 |
"#include E<lt>stdio.hE<gt>\n" |
| 1649 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1650 |
"#include E<lt>string.hE<gt>\n" |
| 1651 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1652 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 1653 |
"\\&\n" |
| 1654 |
"#include \"svshm_string.h\"\n" |
| 1655 |
"\\&\n" |
| 1656 |
"int\n" |
| 1657 |
"main(int argc, char *argv[])\n" |
| 1658 |
"{\n" |
| 1659 |
" int semid, shmid;\n" |
| 1660 |
" char *addr;\n" |
| 1661 |
" size_t size;\n" |
| 1662 |
" struct sembuf sop;\n" |
| 1663 |
"\\&\n" |
| 1664 |
" if (argc != 4) {\n" |
| 1665 |
" fprintf(stderr, \"Usage: %s shmid semid string\\[rs]n\", argv[0]);\n" |
| 1666 |
" exit(EXIT_FAILURE);\n" |
| 1667 |
" }\n" |
| 1668 |
"\\&\n" |
| 1669 |
" size = strlen(argv[3]) + 1; /* +1 to include trailing \\[aq]\\[rs]0\\[aq] */\n" |
| 1670 |
" if (size E<gt> MEM_SIZE) {\n" |
| 1671 |
" fprintf(stderr, \"String is too big!\\[rs]n\");\n" |
| 1672 |
" exit(EXIT_FAILURE);\n" |
| 1673 |
" }\n" |
| 1674 |
"\\&\n" |
| 1675 |
" /* Get object IDs from command-line. */\n" |
| 1676 |
"\\&\n" |
| 1677 |
" shmid = atoi(argv[1]);\n" |
| 1678 |
" semid = atoi(argv[2]);\n" |
| 1679 |
"\\&\n" |
| 1680 |
" /* Attach shared memory into our address space and copy string\n" |
| 1681 |
" (including trailing null byte) into memory. */\n" |
| 1682 |
"\\&\n" |
| 1683 |
" addr = shmat(shmid, NULL, 0);\n" |
| 1684 |
" if (addr == (void *) -1)\n" |
| 1685 |
" errExit(\"shmat\");\n" |
| 1686 |
"\\&\n" |
| 1687 |
" memcpy(addr, argv[3], size);\n" |
| 1688 |
"\\&\n" |
| 1689 |
" /* Decrement semaphore to 0. */\n" |
| 1690 |
"\\&\n" |
| 1691 |
" sop.sem_num = 0;\n" |
| 1692 |
" sop.sem_op = -1;\n" |
| 1693 |
" sop.sem_flg = 0;\n" |
| 1694 |
"\\&\n" |
| 1695 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1696 |
" errExit(\"semop\");\n" |
| 1697 |
"\\&\n" |
| 1698 |
" exit(EXIT_SUCCESS);\n" |
| 1699 |
"}\n" |
| 1700 |
msgstr "" |
| 1701 |
"/* svshm_string_write.c\n" |
| 1702 |
"\\&\n" |
| 1703 |
" Sous licence GNU General Public v2 ou postérieure.\n" |
| 1704 |
"*/\n" |
| 1705 |
"#include E<lt>stdio.hE<gt>\n" |
| 1706 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1707 |
"#include E<lt>string.hE<gt>\n" |
| 1708 |
"#include E<lt>sys/sem.hE<gt>\n" |
| 1709 |
"#include E<lt>sys/shm.hE<gt>\n" |
| 1710 |
"\\&\n" |
| 1711 |
"#include \"svshm_string.h\"\n" |
| 1712 |
"\\&\n" |
| 1713 |
"int\n" |
| 1714 |
"main(int argc, char *argv[])\n" |
| 1715 |
"{\n" |
| 1716 |
" int semid, shmid;\n" |
| 1717 |
" char *addr;\n" |
| 1718 |
" size_t len;\n" |
| 1719 |
" struct sembuf sop;\n" |
| 1720 |
"\\&\n" |
| 1721 |
" if (argc != 4) {\n" |
| 1722 |
" fprintf(stderr, \"Utilisation : %s shmid semid string\\[rs]n\", argv[0]);\n" |
| 1723 |
" exit(EXIT_FAILURE);\n" |
| 1724 |
" }\n" |
| 1725 |
"\\&\n" |
| 1726 |
" len = strlen(argv[3]) + 1; /* +1 pour inclure le \\[aq]\\[rs]0\\[aq] final */\n" |
| 1727 |
" if (len E<gt> MEM_SIZE) {\n" |
| 1728 |
" fprintf(stderr, \"La chaîne est trop longue\\ !\\[rs]n\");\n" |
| 1729 |
" exit(EXIT_FAILURE);\n" |
| 1730 |
" }\n" |
| 1731 |
"\\&\n" |
| 1732 |
" /* Obtenir les identifiants de l'objet depuis la ligne de commande. */\n" |
| 1733 |
"\\&\n" |
| 1734 |
" shmid = atoi(argv[1]);\n" |
| 1735 |
" semid = atoi(argv[2]);\n" |
| 1736 |
"\\&\n" |
| 1737 |
" /* Attacher la mémoire partagée dans notre espace d'adressage et copier\n" |
| 1738 |
" la chaîne (et notamment l'octet NULL final) dans la mémoire. */\n" |
| 1739 |
"\\&\n" |
| 1740 |
" addr = shmat(shmid, NULL, 0);\n" |
| 1741 |
" if (addr == (void *) -1)\n" |
| 1742 |
" errExit(\"shmat\");\n" |
| 1743 |
"\\&\n" |
| 1744 |
" memcpy(addr, argv[3], len);\n" |
| 1745 |
"\\&\n" |
| 1746 |
" /* Décrémenter le sémaphore à B<0> */\n" |
| 1747 |
"\\&\n" |
| 1748 |
" sop.sem_num = 0;\n" |
| 1749 |
" sop.sem_op = -1;\n" |
| 1750 |
" sop.sem_flg = 0;\n" |
| 1751 |
"\\&\n" |
| 1752 |
" if (semop(semid, &sop, 1) == -1)\n" |
| 1753 |
" errExit(\"semop\");\n" |
| 1754 |
"\\&\n" |
| 1755 |
" exit(EXIT_SUCCESS);\n" |
| 1756 |
"}\n" |
| 1757 |
|
| 1758 |
#. type: TH |
| 1759 |
#: mageia-cauldron |
| 1760 |
#, no-wrap |
| 1761 |
msgid "Linux man-pages 6.17" |
| 1762 |
msgstr "Pages du manuel de Linux 6.17" |
| 1763 |
|
| 1764 |
#. type: TH |
| 1765 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 1766 |
#, no-wrap |
| 1767 |
msgid "Linux man-pages (unreleased)" |
| 1768 |
msgstr "Pages du manuel de Linux (non publiées)" |