| 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. |
| 16 |
# Denis Barbier <[email protected]>, 2006, 2010. |
| 17 |
# David Prévot <[email protected]>, 2010, 2012, 2013. |
| 18 |
# Cédric Boutillier <[email protected]>, 2011, 2012. |
| 19 |
# Frédéric Hantrais <[email protected]>, 2013, 2014. |
| 20 |
# Jean-Philippe MENGUAL <[email protected]>, 2020-2024. |
| 21 |
msgid "" |
| 22 |
msgstr "" |
| 23 |
"Project-Id-Version: manpages-l10n 4.24.0\n" |
| 24 |
"POT-Creation-Date: 2026-06-05 06:29+0200\n" |
| 25 |
"PO-Revision-Date: 2026-06-10 17:58+0200\n" |
| 26 |
"Last-Translator: Jean-Philippe MENGUAL <[email protected]>\n" |
| 27 |
"Language-Team: French <[email protected]>\n" |
| 28 |
"Language: fr\n" |
| 29 |
"MIME-Version: 1.0\n" |
| 30 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 31 |
"Content-Transfer-Encoding: 8bit\n" |
| 32 |
"Plural-Forms: nplurals=2; plural=n > 1;\n" |
| 33 |
"X-Generator: Lokalize 22.12.3\n" |
| 34 |
|
| 35 |
#. type: TH |
| 36 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 37 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 38 |
#, no-wrap |
| 39 |
msgid "kcmp" |
| 40 |
msgstr "kcmp" |
| 41 |
|
| 42 |
#. type: TH |
| 43 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 44 |
#: opensuse-tumbleweed |
| 45 |
#, no-wrap |
| 46 |
msgid "2026-02-08" |
| 47 |
msgstr "8 février 2026" |
| 48 |
|
| 49 |
#. type: TH |
| 50 |
#: archlinux debian-unstable |
| 51 |
#, no-wrap |
| 52 |
msgid "Linux man-pages 6.18" |
| 53 |
msgstr "Pages du manuel de Linux 6.18" |
| 54 |
|
| 55 |
#. type: SH |
| 56 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 57 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 58 |
#, no-wrap |
| 59 |
msgid "NAME" |
| 60 |
msgstr "NOM" |
| 61 |
|
| 62 |
#. type: Plain text |
| 63 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 64 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 65 |
msgid "" |
| 66 |
"kcmp - compare two processes to determine if they share a kernel resource" |
| 67 |
msgstr "" |
| 68 |
"kcmp - comparer deux processus afin de déterminer s'ils partagent des " |
| 69 |
"ressources du noyau" |
| 70 |
|
| 71 |
#. type: SH |
| 72 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 73 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 74 |
#, no-wrap |
| 75 |
msgid "LIBRARY" |
| 76 |
msgstr "BIBLIOTHÈQUE" |
| 77 |
|
| 78 |
#. type: Plain text |
| 79 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 80 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 81 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 82 |
msgstr "Bibliothèque C standard (I<libc>,\\ I<-lc>)" |
| 83 |
|
| 84 |
#. type: SH |
| 85 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 86 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 87 |
#, no-wrap |
| 88 |
msgid "SYNOPSIS" |
| 89 |
msgstr "SYNOPSIS" |
| 90 |
|
| 91 |
#. type: Plain text |
| 92 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 93 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 94 |
#, no-wrap |
| 95 |
msgid "" |
| 96 |
"B<#include E<lt>linux/kcmp.hE<gt>> /* Definition of B<KCMP_*> constants */\n" |
| 97 |
"B<#include E<lt>sys/syscall.hE<gt>> /* Definition of B<SYS_*> constants */\n" |
| 98 |
"B<#include E<lt>unistd.hE<gt>>\n" |
| 99 |
msgstr "" |
| 100 |
"B<#include E<lt>linux/kcmp.hE<gt>> /* Définition des constantes B<KCMP_*> */\n" |
| 101 |
"B<#include E<lt>sys/syscall.hE<gt>> /* Définition des constantes B<SYS_*> */\\n\"\n" |
| 102 |
"B<#include E<lt>unistd.hE<gt>>\n" |
| 103 |
|
| 104 |
#. type: Plain text |
| 105 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 106 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 107 |
#, no-wrap |
| 108 |
msgid "" |
| 109 |
"B<int syscall(SYS_kcmp, pid_t >I<pid1>B<, pid_t >I<pid2>B<, int >I<type>B<,>\n" |
| 110 |
"B< unsigned long >I<idx1>B<, unsigned long >I<idx2>B<);>\n" |
| 111 |
msgstr "" |
| 112 |
"B<int syscall(SYS_kcmp, pid_t >I<pid1>B<, pid_t >I<pid2>B<, int >I<type>B<,>\\n\"\n" |
| 113 |
"B< unsigned long >I<idx1>B<, unsigned long >I<idx2>B<);>\n" |
| 114 |
|
| 115 |
#. type: Plain text |
| 116 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 117 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 118 |
msgid "" |
| 119 |
"I<Note>: glibc provides no wrapper for B<kcmp>(), necessitating the use of " |
| 120 |
"B<syscall>(2)." |
| 121 |
msgstr "" |
| 122 |
"I<Note> : la glibc ne fournit pas d'enveloppe autour de B<kcmp>(), " |
| 123 |
"nécessitant l'utilisation de B<syscall>(2)." |
| 124 |
|
| 125 |
#. type: SH |
| 126 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 127 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 128 |
#, no-wrap |
| 129 |
msgid "DESCRIPTION" |
| 130 |
msgstr "DESCRIPTION" |
| 131 |
|
| 132 |
#. type: Plain text |
| 133 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 134 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 135 |
msgid "" |
| 136 |
"The B<kcmp>() system call can be used to check whether the two processes " |
| 137 |
"identified by I<pid1> and I<pid2> share a kernel resource such as virtual " |
| 138 |
"memory, file descriptors, and so on." |
| 139 |
msgstr "" |
| 140 |
"L'appel système B<kcmp>() peut être utilisé pour vérifier si deux processus " |
| 141 |
"identifiés par I<pid1> et I<pid2> partagent des ressources du noyau, telles " |
| 142 |
"que de la mémoire virtuelle, des descripteurs de fichiers (FD), etc. " |
| 143 |
|
| 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 |
"Permission to employ B<kcmp>() is governed by ptrace access mode " |
| 149 |
"B<PTRACE_MODE_READ_REALCREDS> checks against both I<pid1> and I<pid2>; see " |
| 150 |
"B<ptrace>(2)." |
| 151 |
msgstr "" |
| 152 |
"Le droit d'utiliser B<kcmp>() est régi par les droits d'accès de ptrace aux " |
| 153 |
"vérifications B<PTRACE_MODE_READ_REALCREDS> vis-à-vis de I<pid1> et de " |
| 154 |
"I<pid2> ; voir B<ptrace>(2)." |
| 155 |
|
| 156 |
#. type: Plain text |
| 157 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 158 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 159 |
msgid "" |
| 160 |
"The I<type> argument specifies which resource is to be compared in the two " |
| 161 |
"processes. It has one of the following values:" |
| 162 |
msgstr "" |
| 163 |
"L'argument I<type> indique pour quelle ressource une comparaison doit être " |
| 164 |
"effectuée entre les deux processus. Il peut prendre l'une des valeurs " |
| 165 |
"suivantes :" |
| 166 |
|
| 167 |
#. type: TP |
| 168 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 169 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 170 |
#, no-wrap |
| 171 |
msgid "B<KCMP_FILE>" |
| 172 |
msgstr "B<KCMP_FILE>" |
| 173 |
|
| 174 |
#. type: Plain text |
| 175 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 176 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 177 |
msgid "" |
| 178 |
"Check whether a file descriptor I<idx1> in the process I<pid1> refers to the " |
| 179 |
"same open file description (see B<open>(2)) as file descriptor I<idx2> in " |
| 180 |
"the process I<pid2>. The existence of two file descriptors that refer to " |
| 181 |
"the same open file description can occur as a result of B<dup>(2) (and " |
| 182 |
"similar) B<fork>(2), or passing file descriptors via a domain socket (see " |
| 183 |
"B<unix>(7))." |
| 184 |
msgstr "" |
| 185 |
"Vérifier si un descripteur de fichier (FD) I<idx1> utilisé par le processus " |
| 186 |
"I<pid1> fait référence à la même description de fichier ouvert (consultez " |
| 187 |
"B<open>(2)) que le descripteur de fichier I<idx2> utilisé par le processus " |
| 188 |
"I<pid2>. L'existence de deux descripteurs de fichiers se rapportant à la " |
| 189 |
"même description de fichier ouvert peut résulter d'un B<dup>(2) (et " |
| 190 |
"équivalent), d'un B<fork>(2), ou du passage de descripteurs de fichiers à " |
| 191 |
"l'aide d'un socket de domaine (consultez B<unix>(7))." |
| 192 |
|
| 193 |
#. type: TP |
| 194 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 195 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 196 |
#, no-wrap |
| 197 |
msgid "B<KCMP_FILES>" |
| 198 |
msgstr "B<KCMP_FILES>" |
| 199 |
|
| 200 |
#. type: Plain text |
| 201 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 202 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 203 |
msgid "" |
| 204 |
"Check whether the processes share the same set of open file descriptors. " |
| 205 |
"The arguments I<idx1> and I<idx2> are ignored. See the discussion of the " |
| 206 |
"B<CLONE_FILES> flag in B<clone>(2)." |
| 207 |
msgstr "" |
| 208 |
"Vérifier si le processus partage un même ensemble de descripteurs de " |
| 209 |
"fichiers ouverts. Les arguments I<idx1> et I<idx2> ne sont pas pris en " |
| 210 |
"compte. Consultez le point sur l'attribut B<CLONE_FILES> dans B<clone>(2)." |
| 211 |
|
| 212 |
#. type: TP |
| 213 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 214 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 215 |
#, no-wrap |
| 216 |
msgid "B<KCMP_FS>" |
| 217 |
msgstr "B<KCMP_FS>" |
| 218 |
|
| 219 |
#. type: Plain text |
| 220 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 221 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 222 |
msgid "" |
| 223 |
"Check whether the processes share the same filesystem information (i.e., " |
| 224 |
"file mode creation mask, working directory, and filesystem root). The " |
| 225 |
"arguments I<idx1> and I<idx2> are ignored. See the discussion of the " |
| 226 |
"B<CLONE_FS> flag in B<clone>(2)." |
| 227 |
msgstr "" |
| 228 |
"Vérifier si les processus partagent les même informations relatives au " |
| 229 |
"système de fichiers (c'est-à-dire le masque de création de mode de fichiers, " |
| 230 |
"le répertoire de travail et la racine du système de fichiers). Les arguments " |
| 231 |
"I<idx1> et I<idx2> ne sont pas pris en compte. Voir le point sur l'attribut " |
| 232 |
"B<CLONE_FS> dans B<clone>(2)." |
| 233 |
|
| 234 |
#. type: TP |
| 235 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 236 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 237 |
#, no-wrap |
| 238 |
msgid "B<KCMP_IO>" |
| 239 |
msgstr "B<KCMP_IO>" |
| 240 |
|
| 241 |
#. type: Plain text |
| 242 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 243 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 244 |
msgid "" |
| 245 |
"Check whether the processes share I/O context. The arguments I<idx1> and " |
| 246 |
"I<idx2> are ignored. See the discussion of the B<CLONE_IO> flag in " |
| 247 |
"B<clone>(2)." |
| 248 |
msgstr "" |
| 249 |
"Vérifier si les processus partagent un contexte E/S. Les arguments I<idx1> " |
| 250 |
"et I<idx2> ne sont pas pris en compte. Voir le point sur l'attribut " |
| 251 |
"B<CLONE_IO> dans B<clone>(2)." |
| 252 |
|
| 253 |
#. type: TP |
| 254 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 255 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 256 |
#, no-wrap |
| 257 |
msgid "B<KCMP_SIGHAND>" |
| 258 |
msgstr "B<KCMP_SIGHAND>" |
| 259 |
|
| 260 |
#. type: Plain text |
| 261 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 262 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 263 |
msgid "" |
| 264 |
"Check whether the processes share the same table of signal dispositions. " |
| 265 |
"The arguments I<idx1> and I<idx2> are ignored. See the discussion of the " |
| 266 |
"B<CLONE_SIGHAND> flag in B<clone>(2)." |
| 267 |
msgstr "" |
| 268 |
"Vérifier si les processus partagent la même table de disposition des " |
| 269 |
"signaux. Les arguments I<idx1> et I<idx2> ne sont pas pris en compte. Voir " |
| 270 |
"le point sur l'attribut B<CLONE_SIGHAND> dans B<clone>(2)." |
| 271 |
|
| 272 |
#. type: TP |
| 273 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 274 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 275 |
#, no-wrap |
| 276 |
msgid "B<KCMP_SYSVSEM>" |
| 277 |
msgstr "B<KCMP_SYSVSEM>" |
| 278 |
|
| 279 |
#. type: Plain text |
| 280 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 281 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 282 |
msgid "" |
| 283 |
"Check whether the processes share the same list of System\\ V semaphore undo " |
| 284 |
"operations. The arguments I<idx1> and I<idx2> are ignored. See the " |
| 285 |
"discussion of the B<CLONE_SYSVSEM> flag in B<clone>(2)." |
| 286 |
msgstr "" |
| 287 |
"Vérifier si les processus partagent la même liste d'opérations «\\ undo\\ » " |
| 288 |
"pour les sémaphores System V. Les arguments I<idx1> et I<idx2> ne sont pas " |
| 289 |
"pris en compte. VOir le point sur l'attribut B<CLONE_SYSVSEM> dans " |
| 290 |
"B<clone>(2)." |
| 291 |
|
| 292 |
#. type: TP |
| 293 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 294 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 295 |
#, no-wrap |
| 296 |
msgid "B<KCMP_VM>" |
| 297 |
msgstr "B<KCMP_VM>" |
| 298 |
|
| 299 |
#. type: Plain text |
| 300 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 301 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 302 |
msgid "" |
| 303 |
"Check whether the processes share the same address space. The arguments " |
| 304 |
"I<idx1> and I<idx2> are ignored. See the discussion of the B<CLONE_VM> flag " |
| 305 |
"in B<clone>(2)." |
| 306 |
msgstr "" |
| 307 |
"Vérifier si les processus partagent le même espace d'adressage. Les " |
| 308 |
"arguments I<idx1> et I<idx2> ne sont pas pris en compte. Voir le point sur " |
| 309 |
"l'attribut B<CLONE_VM> dans B<clone>(2)." |
| 310 |
|
| 311 |
#. type: TP |
| 312 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 313 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 314 |
#, no-wrap |
| 315 |
msgid "B<KCMP_EPOLL_TFD> (since Linux 4.13)" |
| 316 |
msgstr "B<KCMP_EPOLL_TFD> (depuis Linux 4.13)" |
| 317 |
|
| 318 |
#. commit 0791e3644e5ef21646fe565b9061788d05ec71d4 |
| 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 "" |
| 323 |
"Check whether the file descriptor I<idx1> of the process I<pid1> is present " |
| 324 |
"in the B<epoll>(7) instance described by I<idx2> of the process I<pid2>. " |
| 325 |
"The argument I<idx2> is a pointer to a structure where the target file is " |
| 326 |
"described. This structure has the form:" |
| 327 |
msgstr "" |
| 328 |
"Vérifier si le descripteur de fichier I<idx1> du processus I<pid1> est " |
| 329 |
"présent dans l'instance B<epoll>(7) décrite par I<idx2> du processus " |
| 330 |
"I<pid2>. Le paramètre I<idx2> est un pointeur vers une structure où est " |
| 331 |
"décrit le fichier cible. Cette structure prend la forme :" |
| 332 |
|
| 333 |
#. type: Plain text |
| 334 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 335 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 336 |
#, no-wrap |
| 337 |
msgid "" |
| 338 |
"struct kcmp_epoll_slot {\n" |
| 339 |
" __u32 efd;\n" |
| 340 |
" __u32 tfd;\n" |
| 341 |
" __u64 toff;\n" |
| 342 |
"};\n" |
| 343 |
msgstr "" |
| 344 |
"struct kcmp_epoll_slot {\n" |
| 345 |
" __u32 efd;\n" |
| 346 |
" __u32 tfd;\n" |
| 347 |
" __u64 toff;\n" |
| 348 |
"};\n" |
| 349 |
|
| 350 |
#. type: Plain text |
| 351 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 352 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 353 |
msgid "" |
| 354 |
"Within this structure, I<efd> is an epoll file descriptor returned from " |
| 355 |
"B<epoll_create>(2), I<tfd> is a target file descriptor number, and I<toff> " |
| 356 |
"is a target file offset counted from zero. Several different targets may be " |
| 357 |
"registered with the same file descriptor number and setting a specific " |
| 358 |
"offset helps to investigate each of them." |
| 359 |
msgstr "" |
| 360 |
"Dans cette structure, I<efd> est un descripteur de fichier epoll renvoyé " |
| 361 |
"depuis B<epoll_create>(2), I<tfd> est un numéro de descripteur de fichier " |
| 362 |
"cible et I<toff> est une position du fichier cible déterminée à partir de " |
| 363 |
"zéro. Plusieurs cibles peuvent être enregistrées avec le même numéro de " |
| 364 |
"descripteur de fichier, indiquer une position aide donc à examiner chacune " |
| 365 |
"d'elles." |
| 366 |
|
| 367 |
#. type: Plain text |
| 368 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 369 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 370 |
msgid "" |
| 371 |
"Note the B<kcmp>() is not protected against false positives which may occur " |
| 372 |
"if the processes are currently running. One should stop the processes by " |
| 373 |
"sending B<SIGSTOP> (see B<signal>(7)) prior to inspection with this system " |
| 374 |
"call to obtain meaningful results." |
| 375 |
msgstr "" |
| 376 |
"Remarquez que B<kcmp>() n'est pas à l'abri de « faux positifs » qui peuvent " |
| 377 |
"survenir si des tâches sont en cours d'exécution. Pour obtenir des résultats " |
| 378 |
"pertinents, on peut arrêter ces tâches au moyen de l'appel système " |
| 379 |
"B<SIGSTOP> (consulter B<signal>(7)) avant de commencer l'examen avec cet " |
| 380 |
"appel système pour des résultats plus significatifs." |
| 381 |
|
| 382 |
#. type: SH |
| 383 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 384 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 385 |
#, no-wrap |
| 386 |
msgid "RETURN VALUE" |
| 387 |
msgstr "VALEUR RENVOYÉE" |
| 388 |
|
| 389 |
#. type: Plain text |
| 390 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 391 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 392 |
msgid "" |
| 393 |
"The return value of a successful call to B<kcmp>() is simply the result of " |
| 394 |
"arithmetic comparison of kernel pointers (when the kernel compares " |
| 395 |
"resources, it uses their memory addresses)." |
| 396 |
msgstr "" |
| 397 |
"La valeur renvoyée par un appel réussi à B<kcmp>() est le résultat de la " |
| 398 |
"comparaison arithmétique des pointeurs du noyau (lorsque le noyau compare " |
| 399 |
"des ressources, il utilise leurs adresses en mémoire)." |
| 400 |
|
| 401 |
#. type: Plain text |
| 402 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 403 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 404 |
msgid "" |
| 405 |
"The easiest way to explain is to consider an example. Suppose that I<v1> " |
| 406 |
"and I<v2> are the addresses of appropriate resources, then the return value " |
| 407 |
"is one of the following:" |
| 408 |
msgstr "" |
| 409 |
"Pour mieux comprendre, regardons l'exemple suivant. Supposons que I<v1> et " |
| 410 |
"I<v2> sont les adresses des ressources concernées, alors la valeur renvoyée " |
| 411 |
"sera l'une des suivantes :" |
| 412 |
|
| 413 |
#. type: TP |
| 414 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 415 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 416 |
#, no-wrap |
| 417 |
msgid "B<0>" |
| 418 |
msgstr "B<0>" |
| 419 |
|
| 420 |
#. type: Plain text |
| 421 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 422 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 423 |
msgid "" |
| 424 |
"I<v1> is equal to I<v2>; in other words, the two processes share the " |
| 425 |
"resource." |
| 426 |
msgstr "" |
| 427 |
"I<v1> est égal à I<v2> ; en d'autres termes, les deux processus partagent la " |
| 428 |
"même ressource." |
| 429 |
|
| 430 |
#. type: TP |
| 431 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 432 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 433 |
#, no-wrap |
| 434 |
msgid "B<1>" |
| 435 |
msgstr "B<1>" |
| 436 |
|
| 437 |
#. type: Plain text |
| 438 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 439 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 440 |
msgid "I<v1> is less than I<v2>." |
| 441 |
msgstr "I<v1> est inférieur à I<v2>." |
| 442 |
|
| 443 |
#. type: TP |
| 444 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 445 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 446 |
#, no-wrap |
| 447 |
msgid "B<2>" |
| 448 |
msgstr "B<2>" |
| 449 |
|
| 450 |
#. type: Plain text |
| 451 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 452 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 453 |
msgid "I<v1> is greater than I<v2>." |
| 454 |
msgstr "I<v1> est supérieur à I<v2>." |
| 455 |
|
| 456 |
#. type: TP |
| 457 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 458 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 459 |
#, no-wrap |
| 460 |
msgid "B<3>" |
| 461 |
msgstr "B<3>" |
| 462 |
|
| 463 |
#. type: Plain text |
| 464 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 465 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 466 |
msgid "I<v1> is not equal to I<v2>, but ordering information is unavailable." |
| 467 |
msgstr "" |
| 468 |
"I<v1> n'est pas égal à I<v2>, mais aucune information concernant l'ordre " |
| 469 |
"n'est disponible." |
| 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 "On error, -1 is returned, and I<errno> is set to indicate the error." |
| 475 |
msgstr "" |
| 476 |
"En cas d'erreur, la valeur de retour est B<-1> et I<errno> est définie pour " |
| 477 |
"préciser l'erreur." |
| 478 |
|
| 479 |
#. type: Plain text |
| 480 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 481 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 482 |
msgid "" |
| 483 |
"B<kcmp>() was designed to return values suitable for sorting. This is " |
| 484 |
"particularly handy if one needs to compare a large number of file " |
| 485 |
"descriptors." |
| 486 |
msgstr "" |
| 487 |
"B<kcmp>() a été conçu pour renvoyer des variables pouvant être triées. C'est " |
| 488 |
"particulièrement pratique lorsqu'on souhaite comparer un grand nombre de " |
| 489 |
"descripteurs de fichiers." |
| 490 |
|
| 491 |
#. type: SH |
| 492 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 493 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 494 |
#, no-wrap |
| 495 |
msgid "ERRORS" |
| 496 |
msgstr "ERREURS" |
| 497 |
|
| 498 |
#. type: TP |
| 499 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 500 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 501 |
#, no-wrap |
| 502 |
msgid "B<EBADF>" |
| 503 |
msgstr "B<EBADF>" |
| 504 |
|
| 505 |
#. type: Plain text |
| 506 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 507 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 508 |
msgid "" |
| 509 |
"I<type> is B<KCMP_FILE> and I<fd1> or I<fd2> is not an open file descriptor." |
| 510 |
msgstr "" |
| 511 |
"I<type> est B<KCMP_FILE> et I<fd1> ou I<fd2> n'est pas un descripteur de " |
| 512 |
"fichier ouvert." |
| 513 |
|
| 514 |
#. type: TP |
| 515 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 516 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 517 |
#, no-wrap |
| 518 |
msgid "B<EFAULT>" |
| 519 |
msgstr "B<EFAULT>" |
| 520 |
|
| 521 |
#. type: Plain text |
| 522 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 523 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 524 |
msgid "" |
| 525 |
"The epoll slot addressed by I<idx2> is outside of the user's address space." |
| 526 |
msgstr "" |
| 527 |
"L'emplacement epoll désigné par I<idx2> dépasse l'espace d'adressage de " |
| 528 |
"l'utilisateur." |
| 529 |
|
| 530 |
#. type: TP |
| 531 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 532 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 533 |
#, no-wrap |
| 534 |
msgid "B<EINVAL>" |
| 535 |
msgstr "B<EINVAL>" |
| 536 |
|
| 537 |
#. type: Plain text |
| 538 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 539 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 540 |
msgid "I<type> is invalid." |
| 541 |
msgstr "I<type> n'est pas valable." |
| 542 |
|
| 543 |
#. type: TP |
| 544 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 545 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 546 |
#, no-wrap |
| 547 |
msgid "B<ENOENT>" |
| 548 |
msgstr "B<ENOENT>" |
| 549 |
|
| 550 |
#. type: Plain text |
| 551 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 552 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 553 |
msgid "The target file is not present in B<epoll>(7) instance." |
| 554 |
msgstr "Le fichier cible n'est pas présent dans l'instance B<epoll>(7)." |
| 555 |
|
| 556 |
#. type: TP |
| 557 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 558 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 559 |
#, no-wrap |
| 560 |
msgid "B<EPERM>" |
| 561 |
msgstr "B<EPERM>" |
| 562 |
|
| 563 |
#. type: Plain text |
| 564 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 565 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 566 |
msgid "" |
| 567 |
"Insufficient permission to inspect process resources. The B<CAP_SYS_PTRACE> " |
| 568 |
"capability is required to inspect processes that you do not own. Other " |
| 569 |
"ptrace limitations may also apply, such as B<CONFIG_SECURITY_YAMA>, which, " |
| 570 |
"when I</proc/sys/kernel/yama/ptrace_scope> is 2, limits B<kcmp>() to child " |
| 571 |
"processes; see B<ptrace>(2)." |
| 572 |
msgstr "" |
| 573 |
"Permissions insuffisantes pour inspecter les ressources du processus. Le " |
| 574 |
"privilège B<CAP_SYS_PTRACE> est nécessaire pour inspecter les processus dont " |
| 575 |
"vous n'êtes pas propriétaire. D'autres limites de ptrace peuvent également " |
| 576 |
"s'appliquer, telles que B<CONFIG_SECURITY_YAMA> qui, lorsque I</proc/sys/" |
| 577 |
"kernel/yama/ptrace_scope> vaut B<2>, limite B<kcmp>() aux processus " |
| 578 |
"enfants ; voir B<ptrace>(2)." |
| 579 |
|
| 580 |
#. type: TP |
| 581 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 582 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 583 |
#, no-wrap |
| 584 |
msgid "B<ESRCH>" |
| 585 |
msgstr "B<ESRCH>" |
| 586 |
|
| 587 |
#. type: Plain text |
| 588 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 589 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 590 |
msgid "Process I<pid1> or I<pid2> does not exist." |
| 591 |
msgstr "Au moins l'un des processus I<pid1> ou I<pid2> n'existe pas." |
| 592 |
|
| 593 |
#. type: SH |
| 594 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 595 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 596 |
#, no-wrap |
| 597 |
msgid "STANDARDS" |
| 598 |
msgstr "NORMES" |
| 599 |
|
| 600 |
#. type: Plain text |
| 601 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 602 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 603 |
msgid "Linux." |
| 604 |
msgstr "Linux." |
| 605 |
|
| 606 |
#. type: SH |
| 607 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 608 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 609 |
#, no-wrap |
| 610 |
msgid "HISTORY" |
| 611 |
msgstr "HISTORIQUE" |
| 612 |
|
| 613 |
#. type: Plain text |
| 614 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 615 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 616 |
msgid "Linux 3.5." |
| 617 |
msgstr "Linux 3.5." |
| 618 |
|
| 619 |
#. type: Plain text |
| 620 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 621 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 622 |
msgid "" |
| 623 |
"Before Linux 5.12, this system call is available only if the kernel is " |
| 624 |
"configured with B<CONFIG_CHECKPOINT_RESTORE>, since the original purpose of " |
| 625 |
"the system call was for the checkpoint/restore in user space (CRIU) " |
| 626 |
"feature. (The alternative to this system call would have been to expose " |
| 627 |
"suitable process information via the B<proc>(5) filesystem; this was deemed " |
| 628 |
"to be unsuitable for security reasons.) Since Linux 5.12, this system call " |
| 629 |
"is also available if the kernel is configured with B<CONFIG_KCMP>." |
| 630 |
msgstr "" |
| 631 |
"Avant Linux 5.12, cet appel système n'était disponible que si le noyau avait " |
| 632 |
"été configuré avec B<CONFIG_CHECKPOINT_RESTORE>, vu que le but originel de " |
| 633 |
"cet appel système était pour la fonctionnalité de gel des applications " |
| 634 |
"(checkpoint/restore) dans l'espace utilisateur (CRIU) (l'alternative à cet " |
| 635 |
"appel système aurait consisté à présenter les informations pertinentes " |
| 636 |
"concernant le processus à l’aide du système de fichier B<proc>(5) ; cette " |
| 637 |
"solution n'a pas été jugée satisfaisante pour des raisons de sécurité). " |
| 638 |
"Depuis Linux 5.12, cet appel système est disponible également si le noyau " |
| 639 |
"est configuré avec B<CONFIG_KCMP>." |
| 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 "NOTES" |
| 646 |
msgstr "NOTES" |
| 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 |
"See B<clone>(2) for some background information on the shared resources " |
| 653 |
"referred to on this page." |
| 654 |
msgstr "" |
| 655 |
"Consultez B<clone>(2) pour obtenir des informations générales sur les " |
| 656 |
"ressources partagées dont il est fait mention dans cette page. " |
| 657 |
|
| 658 |
#. type: SH |
| 659 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 660 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 661 |
#, no-wrap |
| 662 |
msgid "EXAMPLES" |
| 663 |
msgstr "EXEMPLES" |
| 664 |
|
| 665 |
#. type: Plain text |
| 666 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 667 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 668 |
msgid "" |
| 669 |
"The program below uses B<kcmp>() to test whether pairs of file descriptors " |
| 670 |
"refer to the same open file description. The program tests different cases " |
| 671 |
"for the file descriptor pairs, as described in the program output. An " |
| 672 |
"example run of the program is as follows:" |
| 673 |
msgstr "" |
| 674 |
"Le programme ci-dessous utilise B<kcmp>() pour tester si les pairs de " |
| 675 |
"descripteurs de fichiers renvoient à la même description de fichiers (FD) " |
| 676 |
"ouverts. Le programme teste différents cas pour les pairs de descripteurs de " |
| 677 |
"fichiers (FD), comme le décrit sa sortie. Un exemple d'exécution du " |
| 678 |
"programme suit :" |
| 679 |
|
| 680 |
#. type: Plain text |
| 681 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 682 |
#: opensuse-tumbleweed |
| 683 |
#, no-wrap |
| 684 |
msgid "" |
| 685 |
"$B< ./a.out>;\n" |
| 686 |
"Parent PID is 1144\n" |
| 687 |
"Parent opened file on FD 3\n" |
| 688 |
"\\&\n" |
| 689 |
"PID of child of fork() is 1145\n" |
| 690 |
"\tCompare duplicate FDs from different processes:\n" |
| 691 |
"\t\tkcmp(1145, 1144, KCMP_FILE, 3, 3) ==E<gt> same\n" |
| 692 |
"Child opened file on FD 4\n" |
| 693 |
"\tCompare FDs from distinct open()s in same process:\n" |
| 694 |
"\t\tkcmp(1145, 1145, KCMP_FILE, 3, 4) ==E<gt> different\n" |
| 695 |
"Child duplicated FD 3 to create FD 5\n" |
| 696 |
"\tCompare duplicated FDs in same process:\n" |
| 697 |
"\t\tkcmp(1145, 1145, KCMP_FILE, 3, 5) ==E<gt> same\n" |
| 698 |
msgstr "" |
| 699 |
"$B< ./a.out>;\n" |
| 700 |
"Le PID parent est 1144\n" |
| 701 |
"Fichier ouvert parent sur FD 3\n" |
| 702 |
"\\&\n" |
| 703 |
"Le PID de l'enfant de fork() est 1145\n" |
| 704 |
"\tComparaison des FDs dupliqués issus de processus différents :\n" |
| 705 |
"\t\tkcmp(1145, 1144, KCMP_FILE, 3, 3) ==E<gt> same\n" |
| 706 |
"Fichier enfant ouvert sur FD 4\n" |
| 707 |
"\tComparaison des FDs issus d'open()s distincts dans le même processus :\n" |
| 708 |
"\t\tkcmp(1145, 1145, KCMP_FILE, 3, 4) ==E<gt> different\n" |
| 709 |
"Le FD 3 dupliqué enfant pour créer le FD 5\n" |
| 710 |
"\tComparaison des FDs dupliqués dans le même processus :\n" |
| 711 |
"\t\tkcmp(1145, 1145, KCMP_FILE, 3, 5) ==E<gt> same\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" |
| 718 |
msgstr "Source du programme" |
| 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 |
#, no-wrap |
| 724 |
msgid "" |
| 725 |
"#define _GNU_SOURCE\n" |
| 726 |
"#include E<lt>err.hE<gt>\n" |
| 727 |
"#include E<lt>fcntl.hE<gt>\n" |
| 728 |
"#include E<lt>linux/kcmp.hE<gt>\n" |
| 729 |
"#include E<lt>stdint.hE<gt>\n" |
| 730 |
"#include E<lt>stdio.hE<gt>\n" |
| 731 |
"#include E<lt>stdlib.hE<gt>\n" |
| 732 |
"#include E<lt>sys/syscall.hE<gt>\n" |
| 733 |
"#include E<lt>sys/types.hE<gt>\n" |
| 734 |
"#include E<lt>sys/wait.hE<gt>\n" |
| 735 |
"#include E<lt>unistd.hE<gt>\n" |
| 736 |
"\\&\n" |
| 737 |
"static int\n" |
| 738 |
"kcmp(pid_t pid1, pid_t pid2, int type,\n" |
| 739 |
" unsigned long idx1, unsigned long idx2)\n" |
| 740 |
"{\n" |
| 741 |
" return syscall(SYS_kcmp, pid1, pid2, type, idx1, idx2);\n" |
| 742 |
"}\n" |
| 743 |
"\\&\n" |
| 744 |
"static void\n" |
| 745 |
"test_kcmp(char *msg, pid_t pid1, pid_t pid2, int fd_a, int fd_b)\n" |
| 746 |
"{\n" |
| 747 |
" printf(\"\\[rs]t%s\\[rs]n\", msg);\n" |
| 748 |
" printf(\"\\[rs]t\\[rs]tkcmp(%jd, %jd, KCMP_FILE, %d, %d) ==E<gt> %s\\[rs]n\",\n" |
| 749 |
" (intmax_t) pid1, (intmax_t) pid2, fd_a, fd_b,\n" |
| 750 |
" (kcmp(pid1, pid2, KCMP_FILE, fd_a, fd_b) == 0) ?\n" |
| 751 |
" \"same\" : \"different\");\n" |
| 752 |
"}\n" |
| 753 |
"\\&\n" |
| 754 |
"int\n" |
| 755 |
"main(void)\n" |
| 756 |
"{\n" |
| 757 |
" int fd1, fd2, fd3;\n" |
| 758 |
" static const char pathname[] = \"/tmp/kcmp.test\";\n" |
| 759 |
"\\&\n" |
| 760 |
" fd1 = open(pathname, O_CREAT | O_RDWR, 0600);\n" |
| 761 |
" if (fd1 == -1)\n" |
| 762 |
" err(EXIT_FAILURE, \"open\");\n" |
| 763 |
"\\&\n" |
| 764 |
" printf(\"Parent PID is %jd\\[rs]n\", (intmax_t) getpid());\n" |
| 765 |
" printf(\"Parent opened file on FD %d\\[rs]n\\[rs]n\", fd1);\n" |
| 766 |
"\\&\n" |
| 767 |
" switch (fork()) {\n" |
| 768 |
" case -1:\n" |
| 769 |
" err(EXIT_FAILURE, \"fork\");\n" |
| 770 |
"\\&\n" |
| 771 |
" case 0:\n" |
| 772 |
" printf(\"PID of child of fork() is %jd\\[rs]n\", (intmax_t) getpid());\n" |
| 773 |
"\\&\n" |
| 774 |
" test_kcmp(\"Compare duplicate FDs from different processes:\",\n" |
| 775 |
" getpid(), getppid(), fd1, fd1);\n" |
| 776 |
"\\&\n" |
| 777 |
" fd2 = open(pathname, O_CREAT | O_RDWR, 0600);\n" |
| 778 |
" if (fd2 == -1)\n" |
| 779 |
" err(EXIT_FAILURE, \"open\");\n" |
| 780 |
" printf(\"Child opened file on FD %d\\[rs]n\", fd2);\n" |
| 781 |
"\\&\n" |
| 782 |
" test_kcmp(\"Compare FDs from distinct open()s in same process:\",\n" |
| 783 |
" getpid(), getpid(), fd1, fd2);\n" |
| 784 |
"\\&\n" |
| 785 |
" fd3 = dup(fd1);\n" |
| 786 |
" if (fd3 == -1)\n" |
| 787 |
" err(EXIT_FAILURE, \"dup\");\n" |
| 788 |
" printf(\"Child duplicated FD %d to create FD %d\\[rs]n\", fd1, fd3);\n" |
| 789 |
"\\&\n" |
| 790 |
" test_kcmp(\"Compare duplicated FDs in same process:\",\n" |
| 791 |
" getpid(), getpid(), fd1, fd3);\n" |
| 792 |
" break;\n" |
| 793 |
"\\&\n" |
| 794 |
" default:\n" |
| 795 |
" wait(NULL);\n" |
| 796 |
" }\n" |
| 797 |
"\\&\n" |
| 798 |
" exit(EXIT_SUCCESS);\n" |
| 799 |
"}\n" |
| 800 |
msgstr "" |
| 801 |
"#define _GNU_SOURCE\n" |
| 802 |
"#include E<lt>err.hE<gt>\n" |
| 803 |
"#include E<lt>fcntl.hE<gt>\n" |
| 804 |
"#include E<lt>linux/kcmp.hE<gt>\n" |
| 805 |
"#include E<lt>stdint.hE<gt>\n" |
| 806 |
"#include E<lt>stdio.hE<gt>\n" |
| 807 |
"#include E<lt>stdlib.hE<gt>\n" |
| 808 |
"#include E<lt>sys/syscall.hE<gt>\n" |
| 809 |
"#include E<lt>sys/types.hE<gt>\n" |
| 810 |
"#include E<lt>sys/wait.hE<gt>\n" |
| 811 |
"#include E<lt>unistd.hE<gt>\n" |
| 812 |
"\\&\n" |
| 813 |
"static int\n" |
| 814 |
"kcmp(pid_t pid1, pid_t pid2, int type,\n" |
| 815 |
" unsigned long idx1, unsigned long idx2)\n" |
| 816 |
"{\n" |
| 817 |
" return syscall(SYS_kcmp, pid1, pid2, type, idx1, idx2);\n" |
| 818 |
"}\n" |
| 819 |
"\\&\n" |
| 820 |
"static void\n" |
| 821 |
"test_kcmp(char *msg, pid_t pid1, pid_t pid2, int fd_a, int fd_b)\n" |
| 822 |
"{\n" |
| 823 |
" printf(\"\\[rs]t%s\\[rs]n\", msg);\n" |
| 824 |
" printf(\"\\[rs]t\\[rs]tkcmp(%jd, %jd, KCMP_FILE, %d, %d) ==E<gt> %s\\[rs]n\",\n" |
| 825 |
" (intmax_t) pid1, (intmax_t) pid2, fd_a, fd_b,\n" |
| 826 |
" (kcmp(pid1, pid2, KCMP_FILE, fd_a, fd_b) == 0) ?\n" |
| 827 |
" \"same\" : \"different\");\n" |
| 828 |
"}\n" |
| 829 |
"\\&\n" |
| 830 |
"int\n" |
| 831 |
"main(void)\n" |
| 832 |
"{\n" |
| 833 |
" int fd1, fd2, fd3;\n" |
| 834 |
" static const char pathname[] = \"/tmp/kcmp.test\";\n" |
| 835 |
"\\&\n" |
| 836 |
" fd1 = open(pathname, O_CREAT | O_RDWR, 0600);\n" |
| 837 |
" if (fd1 == -1)\n" |
| 838 |
" err(EXIT_FAILURE, \"open\");\n" |
| 839 |
"\\&\n" |
| 840 |
" printf(\"Le PID parent est %jd\\[rs]n\", (intmax_t) getpid());\n" |
| 841 |
" printf(\"Fichier ouvert parent sur le FD %d\\(rs)n\\[rs]n\", fd1);\n" |
| 842 |
"\\&\n" |
| 843 |
" switch (fork()) {\n" |
| 844 |
" case -1:\n" |
| 845 |
" err(EXIT_FAILURE, \"fork\");\n" |
| 846 |
"\\&\n" |
| 847 |
" case 0:\n" |
| 848 |
" printf(\"Le PID de l'enfant de fork() est %jd\\[rs]n\", (intmax_t) getpid());\n" |
| 849 |
"\\&\n" |
| 850 |
" test_kcmp(\"Comparer les FDs dupliqués issus de processus différents :\",\n" |
| 851 |
" getpid(), getppid(), fd1, fd1);\n" |
| 852 |
"\\&\n" |
| 853 |
" fd2 = open(pathname, O_CREAT | O_RDWR, 0600);\n" |
| 854 |
" if (fd2 == -1)\n" |
| 855 |
" err(EXIT_FAILURE, \"open\");\n" |
| 856 |
" printf(\"L'enfant a ouvert le fichier sur le FD %d\\[rs]n\", fd2);\n" |
| 857 |
"\\&\n" |
| 858 |
" test_kcmp(\"Comparer des FDs issus des mêmes processus open()s :\",\n" |
| 859 |
" getpid(), getpid(), fd1, fd2);\n" |
| 860 |
"\\&\n" |
| 861 |
" fd3 = dup(fd1);\n" |
| 862 |
" if (fd3 == -1)\n" |
| 863 |
" err(EXIT_FAILURE, \"dup\");\n" |
| 864 |
" printf(\"L'enfant a dupliqué le FD %d pour créer le FD %d\\[rs]n\", fd1, fd3);\n" |
| 865 |
"\\&\n" |
| 866 |
" test_kcmp(\"Comparaison de FDs dupliqués dans le même processus :\",\n" |
| 867 |
" getpid(), getpid(), fd1, fd3);\n" |
| 868 |
" break;\n" |
| 869 |
"\\&\n" |
| 870 |
" default:\n" |
| 871 |
" wait(NULL);\n" |
| 872 |
" }\n" |
| 873 |
"\\&\n" |
| 874 |
" exit(EXIT_SUCCESS);\n" |
| 875 |
"}\n" |
| 876 |
|
| 877 |
#. SRC END |
| 878 |
#. type: SH |
| 879 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 880 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 881 |
#, no-wrap |
| 882 |
msgid "SEE ALSO" |
| 883 |
msgstr "VOIR AUSSI" |
| 884 |
|
| 885 |
#. type: Plain text |
| 886 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 887 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 888 |
msgid "B<clone>(2), B<unshare>(2)" |
| 889 |
msgstr "B<clone>(2), B<unshare>(2)" |
| 890 |
|
| 891 |
#. type: TH |
| 892 |
#: debian-trixie |
| 893 |
#, no-wrap |
| 894 |
msgid "2024-06-15" |
| 895 |
msgstr "15 juin 2024" |
| 896 |
|
| 897 |
#. type: TH |
| 898 |
#: debian-trixie |
| 899 |
#, no-wrap |
| 900 |
msgid "Linux man-pages 6.9.1" |
| 901 |
msgstr "Pages du manuel de Linux 6.9.1" |
| 902 |
|
| 903 |
#. type: Plain text |
| 904 |
#: debian-trixie |
| 905 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 906 |
msgstr "Bibliothèque C standard (I<libc>, I<-lc>)" |
| 907 |
|
| 908 |
#. type: Plain text |
| 909 |
#: debian-trixie fedora-44 fedora-rawhide |
| 910 |
#, no-wrap |
| 911 |
msgid "" |
| 912 |
"$ B<./a.out>\n" |
| 913 |
"Parent PID is 1144\n" |
| 914 |
"Parent opened file on FD 3\n" |
| 915 |
"\\&\n" |
| 916 |
"PID of child of fork() is 1145\n" |
| 917 |
"\tCompare duplicate FDs from different processes:\n" |
| 918 |
"\t\tkcmp(1145, 1144, KCMP_FILE, 3, 3) ==E<gt> same\n" |
| 919 |
"Child opened file on FD 4\n" |
| 920 |
"\tCompare FDs from distinct open()s in same process:\n" |
| 921 |
"\t\tkcmp(1145, 1145, KCMP_FILE, 3, 4) ==E<gt> different\n" |
| 922 |
"Child duplicated FD 3 to create FD 5\n" |
| 923 |
"\tCompare duplicated FDs in same process:\n" |
| 924 |
"\t\tkcmp(1145, 1145, KCMP_FILE, 3, 5) ==E<gt> same\n" |
| 925 |
msgstr "" |
| 926 |
"$ B<./a.out>\n" |
| 927 |
"Le PID parent est 1144\n" |
| 928 |
"Fichier ouvert parent sur FD 3\n" |
| 929 |
"\\&\n" |
| 930 |
"Le PID de l'enfant de fork() est 1145\n" |
| 931 |
"\tComparaison des FDs dupliqués issus de processus différents :\n" |
| 932 |
"\t\tkcmp(1145, 1144, KCMP_FILE, 3, 3) ==E<gt> same\n" |
| 933 |
"Fichier enfant ouvert sur FD 4\n" |
| 934 |
"\tComparaison des FDs issus d'open()s distincts dans le même processus :\n" |
| 935 |
"\t\tkcmp(1145, 1145, KCMP_FILE, 3, 4) ==E<gt> different\n" |
| 936 |
"Le FD 3 dupliqué enfant pour créer le FD 5\n" |
| 937 |
"\tComparaison des FDs dupliqués dans le même processus :\n" |
| 938 |
"\t\tkcmp(1145, 1145, KCMP_FILE, 3, 5) ==E<gt> same\n" |
| 939 |
|
| 940 |
#. type: TH |
| 941 |
#: fedora-44 fedora-rawhide |
| 942 |
#, no-wrap |
| 943 |
msgid "2024-07-23" |
| 944 |
msgstr "23 juillet 2024" |
| 945 |
|
| 946 |
#. type: TH |
| 947 |
#: fedora-44 fedora-rawhide |
| 948 |
#, no-wrap |
| 949 |
msgid "Linux man-pages 6.13" |
| 950 |
msgstr "Pages du manuel de Linux 6.13" |
| 951 |
|
| 952 |
#. type: TH |
| 953 |
#: mageia-cauldron |
| 954 |
#, no-wrap |
| 955 |
msgid "Linux man-pages 6.17" |
| 956 |
msgstr "Pages du manuel de Linux 6.17" |
| 957 |
|
| 958 |
#. type: TH |
| 959 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 960 |
#, no-wrap |
| 961 |
msgid "Linux man-pages (unreleased)" |
| 962 |
msgstr "Pages du manuel de Linux (non publiées)" |