| 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. |
| 18 |
# Frédéric Hantrais <[email protected]>, 2013, 2014. |
| 19 |
# Jean-Pierre Giraud <[email protected]>, 2023. |
| 20 |
msgid "" |
| 21 |
msgstr "" |
| 22 |
"Project-Id-Version: manpages-l10n 4.22.0\n" |
| 23 |
"POT-Creation-Date: 2026-06-05 06:38+0200\n" |
| 24 |
"PO-Revision-Date: 2025-05-28 23:38+0200\n" |
| 25 |
"Last-Translator: Jean-Pierre Giraud <[email protected]>\n" |
| 26 |
"Language-Team: French <[email protected]>\n" |
| 27 |
"Language: fr\n" |
| 28 |
"MIME-Version: 1.0\n" |
| 29 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 30 |
"Content-Transfer-Encoding: 8bit\n" |
| 31 |
"Plural-Forms: nplurals=2; plural=n > 1;\n" |
| 32 |
"X-Generator: Lokalize 22.12.3\n" |
| 33 |
|
| 34 |
#. type: TH |
| 35 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 36 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 37 |
#, no-wrap |
| 38 |
msgid "pthread_cancel" |
| 39 |
msgstr "pthread_cancel" |
| 40 |
|
| 41 |
#. type: TH |
| 42 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 43 |
#: opensuse-tumbleweed |
| 44 |
#, no-wrap |
| 45 |
msgid "2025-09-21" |
| 46 |
msgstr "21 septembre 2025" |
| 47 |
|
| 48 |
#. type: TH |
| 49 |
#: archlinux debian-unstable |
| 50 |
#, no-wrap |
| 51 |
msgid "Linux man-pages 6.18" |
| 52 |
msgstr "Pages du manuel de Linux 6.18" |
| 53 |
|
| 54 |
#. type: SH |
| 55 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 56 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 57 |
#, no-wrap |
| 58 |
msgid "NAME" |
| 59 |
msgstr "NOM" |
| 60 |
|
| 61 |
#. type: Plain text |
| 62 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 63 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 64 |
msgid "pthread_cancel - send a cancelation request to a thread" |
| 65 |
msgstr "pthread_cancel — Envoyer une requête d'annulation à un thread" |
| 66 |
|
| 67 |
#. type: SH |
| 68 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 69 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 70 |
#, no-wrap |
| 71 |
msgid "LIBRARY" |
| 72 |
msgstr "BIBLIOTHÈQUE" |
| 73 |
|
| 74 |
#. type: Plain text |
| 75 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 76 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 77 |
msgid "POSIX threads library (I<libpthread>,\\ I<-lpthread>)" |
| 78 |
msgstr "Bibliothèque de threads POSIX (I<libpthread>,\\ I<-lpthread>)" |
| 79 |
|
| 80 |
#. type: SH |
| 81 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 82 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 83 |
#, no-wrap |
| 84 |
msgid "SYNOPSIS" |
| 85 |
msgstr "SYNOPSIS" |
| 86 |
|
| 87 |
#. type: Plain text |
| 88 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 89 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 90 |
#, no-wrap |
| 91 |
msgid "B<#include E<lt>pthread.hE<gt>>\n" |
| 92 |
msgstr "B<#include E<lt>pthread.hE<gt>>\n" |
| 93 |
|
| 94 |
#. type: Plain text |
| 95 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 96 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 97 |
#, no-wrap |
| 98 |
msgid "B<int pthread_cancel(pthread_t >I<thread>B<);>\n" |
| 99 |
msgstr "B<int pthread_cancel(pthread_t >I<thread>B<);>\n" |
| 100 |
|
| 101 |
#. type: SH |
| 102 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 103 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 104 |
#, no-wrap |
| 105 |
msgid "DESCRIPTION" |
| 106 |
msgstr "DESCRIPTION" |
| 107 |
|
| 108 |
#. type: Plain text |
| 109 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 110 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 111 |
msgid "" |
| 112 |
"The B<pthread_cancel>() function sends a cancelation request to the thread " |
| 113 |
"I<thread>. Whether and when the target thread reacts to the cancelation " |
| 114 |
"request depends on two attributes that are under the control of that thread: " |
| 115 |
"its cancelability I<state> and I<type>." |
| 116 |
msgstr "" |
| 117 |
"La fonction B<pthread_cancel>() envoie une requête d'annulation au thread " |
| 118 |
"I<thread>. Si et quand le thread ciblé réagit à la requête d'annulation " |
| 119 |
"dépend de deux attributs qui sont sous le contrôle de ce thread\\ : son état " |
| 120 |
"d'annulation (I<state>) et son mode d'annulation (I<type>)." |
| 121 |
|
| 122 |
#. type: Plain text |
| 123 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 124 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 125 |
msgid "" |
| 126 |
"A thread's cancelability state, determined by B<pthread_setcancelstate>(3), " |
| 127 |
"can be I<enabled> (the default for new threads) or I<disabled>. If a thread " |
| 128 |
"has disabled cancelation, then a cancelation request remains queued until " |
| 129 |
"the thread enables cancelation. If a thread has enabled cancelation, then " |
| 130 |
"its cancelability type determines when cancelation occurs." |
| 131 |
msgstr "" |
| 132 |
"L'état d'annulation d'un thread, déterminé par B<pthread_setcancelstate>(3), " |
| 133 |
"peut être activé (I<enabled>), c'est le défaut pour les nouveaux threads, ou " |
| 134 |
"désactivé (I<disabled>). Si un thread désactive l'annulation, alors une " |
| 135 |
"demande d'annulation restera dans la file d'attente jusqu'à ce que le thread " |
| 136 |
"active l'annulation. Si un thread active l'annulation, alors son mode " |
| 137 |
"d'annulation va déterminer le moment où cette annulation est effectuée." |
| 138 |
|
| 139 |
#. type: Plain text |
| 140 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 141 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 142 |
msgid "" |
| 143 |
"A thread's cancelation type, determined by B<pthread_setcanceltype>(3), may " |
| 144 |
"be either I<asynchronous> or I<deferred> (the default for new threads). " |
| 145 |
"Asynchronous cancelability means that the thread can be canceled at any time " |
| 146 |
"(usually immediately, but the system does not guarantee this). Deferred " |
| 147 |
"cancelability means that cancelation will be delayed until the thread next " |
| 148 |
"calls a function that is a I<cancelation point>. A list of functions that " |
| 149 |
"are or may be cancelation points is provided in B<pthreads>(7)." |
| 150 |
msgstr "" |
| 151 |
"Le mode d'annulation d'un thread, déterminé par B<pthread_setcanceltype>(3), " |
| 152 |
"peut être asynchrone (I<asynchronous>) ou retardée (I<deferred>), qui est le " |
| 153 |
"mode par défaut pour les nouveaux threads. Un mode d'annulation asynchrone " |
| 154 |
"signifie que le thread peut être annulé à tout moment (d'ordinaire " |
| 155 |
"immédiatement, mais ce n'est pas garanti). Un mode d'annulation retardé " |
| 156 |
"signifie que l'annulation peut être retardée jusqu'à ce que le thread " |
| 157 |
"appelle une fonction qui est un point d'annulation (I<cancellation point>). " |
| 158 |
"Une liste des fonctions qui sont ou peuvent être des points d'annulation est " |
| 159 |
"donnée dans B<pthreads>(7)." |
| 160 |
|
| 161 |
#. type: Plain text |
| 162 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 163 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 164 |
msgid "" |
| 165 |
"When a cancelation request is acted on, the following steps occur for " |
| 166 |
"I<thread> (in this order):" |
| 167 |
msgstr "" |
| 168 |
"Quand une requête d'annulation est traitée, les étapes suivantes sont " |
| 169 |
"effectuées pour I<thread> (dans cet ordre)\\ :" |
| 170 |
|
| 171 |
#. type: IP |
| 172 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 173 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 174 |
#, no-wrap |
| 175 |
msgid "(1)" |
| 176 |
msgstr "(1)" |
| 177 |
|
| 178 |
#. type: Plain text |
| 179 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 180 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 181 |
msgid "" |
| 182 |
"Cancelation clean-up handlers are popped (in the reverse of the order in " |
| 183 |
"which they were pushed) and called. (See B<pthread_cleanup_push>(3).)" |
| 184 |
msgstr "" |
| 185 |
"Les gestionnaires de nettoyage sont dépilés (dans l'ordre inverse dans " |
| 186 |
"lequel ils ont été empilés) et appelés (consultez " |
| 187 |
"B<pthread_cleanup_push>(3))." |
| 188 |
|
| 189 |
#. type: IP |
| 190 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 191 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 192 |
#, no-wrap |
| 193 |
msgid "(2)" |
| 194 |
msgstr "(2)" |
| 195 |
|
| 196 |
#. type: Plain text |
| 197 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 198 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 199 |
msgid "" |
| 200 |
"Thread-specific data destructors are called, in an unspecified order. (See " |
| 201 |
"B<pthread_key_create>(3).)" |
| 202 |
msgstr "" |
| 203 |
"Les destructeurs de données spécifiques aux threads sont appelés, dans un " |
| 204 |
"ordre non déterminé (consultez B<pthread_key_create>(3))." |
| 205 |
|
| 206 |
#. type: IP |
| 207 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 208 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 209 |
#, no-wrap |
| 210 |
msgid "(3)" |
| 211 |
msgstr "(3)" |
| 212 |
|
| 213 |
#. type: Plain text |
| 214 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 215 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 216 |
msgid "The thread is terminated. (See B<pthread_exit>(3).)" |
| 217 |
msgstr "Le thread s'est terminé (consultez B<pthread_exit>(3))." |
| 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 |
"The above steps happen asynchronously with respect to the " |
| 224 |
"B<pthread_cancel>() call; the return status of B<pthread_cancel>() merely " |
| 225 |
"informs the caller whether the cancelation request was successfully queued." |
| 226 |
msgstr "" |
| 227 |
"Les étapes ci-dessus sont effectuées de manière asynchrone par rapport à " |
| 228 |
"l'appel à B<pthread_cancel>(). La valeur de retour de B<pthread_cancel>() ne " |
| 229 |
"fait qu'informer l'appelant si une requête d'annulation a été correctement " |
| 230 |
"mise en file d'attente." |
| 231 |
|
| 232 |
#. type: Plain text |
| 233 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 234 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 235 |
msgid "" |
| 236 |
"After a canceled thread has terminated, a join with that thread using " |
| 237 |
"B<pthread_join>(3) obtains B<PTHREAD_CANCELED> as the thread's exit " |
| 238 |
"status. (Joining with a thread is the only way to know that cancelation has " |
| 239 |
"completed.)" |
| 240 |
msgstr "" |
| 241 |
"Après qu'un thread annulé s'est terminé, une demande de jointure par " |
| 242 |
"B<pthread_join>(3) renvoie B<PTHREAD_CANCELED> comme état de sortie du " |
| 243 |
"thread. Il faut noter que joindre un thread est la seule manière de savoir " |
| 244 |
"si une annulation a terminé." |
| 245 |
|
| 246 |
#. type: SH |
| 247 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 248 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 249 |
#, no-wrap |
| 250 |
msgid "RETURN VALUE" |
| 251 |
msgstr "VALEUR RENVOYÉE" |
| 252 |
|
| 253 |
#. type: Plain text |
| 254 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 255 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 256 |
msgid "" |
| 257 |
"On success, B<pthread_cancel>() returns 0; on error, it returns a nonzero " |
| 258 |
"error number." |
| 259 |
msgstr "" |
| 260 |
"En cas de réussite, B<pthread_cancel>() renvoie B<0> ; en cas d'erreur, elle " |
| 261 |
"renvoie un numéro d'erreur non nul." |
| 262 |
|
| 263 |
#. type: SH |
| 264 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 265 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 266 |
#, no-wrap |
| 267 |
msgid "ERRORS" |
| 268 |
msgstr "ERREURS" |
| 269 |
|
| 270 |
#. type: TP |
| 271 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 272 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 273 |
#, no-wrap |
| 274 |
msgid "B<ESRCH>" |
| 275 |
msgstr "B<ESRCH>" |
| 276 |
|
| 277 |
#. type: Plain text |
| 278 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 279 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 280 |
msgid "No thread with the ID I<thread> could be found." |
| 281 |
msgstr "" |
| 282 |
"Aucun fil d’exécution avec pour identifiant I<thread> n'a pu être trouvé." |
| 283 |
|
| 284 |
#. type: SH |
| 285 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 286 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 287 |
#, no-wrap |
| 288 |
msgid "ATTRIBUTES" |
| 289 |
msgstr "ATTRIBUTS" |
| 290 |
|
| 291 |
#. type: Plain text |
| 292 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 293 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 294 |
msgid "" |
| 295 |
"For an explanation of the terms used in this section, see B<attributes>(7)." |
| 296 |
msgstr "" |
| 297 |
"Pour une explication des termes utilisés dans cette section, consulter " |
| 298 |
"B<attributes>(7)." |
| 299 |
|
| 300 |
#. type: tbl table |
| 301 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 302 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 303 |
#, no-wrap |
| 304 |
msgid "Interface" |
| 305 |
msgstr "Interface" |
| 306 |
|
| 307 |
#. type: tbl table |
| 308 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 309 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 310 |
#, no-wrap |
| 311 |
msgid "Attribute" |
| 312 |
msgstr "Attribut" |
| 313 |
|
| 314 |
#. type: tbl table |
| 315 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 316 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 317 |
#, no-wrap |
| 318 |
msgid "Value" |
| 319 |
msgstr "Valeur" |
| 320 |
|
| 321 |
#. type: tbl table |
| 322 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 323 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 324 |
#, no-wrap |
| 325 |
msgid ".na\n" |
| 326 |
msgstr ".na\n" |
| 327 |
|
| 328 |
#. type: tbl table |
| 329 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 330 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 331 |
#, no-wrap |
| 332 |
msgid ".nh\n" |
| 333 |
msgstr ".nh\n" |
| 334 |
|
| 335 |
#. type: tbl table |
| 336 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 337 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 338 |
#, no-wrap |
| 339 |
msgid "B<pthread_cancel>()" |
| 340 |
msgstr "B<pthread_cancel>()" |
| 341 |
|
| 342 |
#. type: tbl table |
| 343 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 344 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 345 |
#, no-wrap |
| 346 |
msgid "Thread safety" |
| 347 |
msgstr "Sécurité des threads" |
| 348 |
|
| 349 |
#. type: tbl table |
| 350 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 351 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 352 |
#, no-wrap |
| 353 |
msgid "MT-Safe" |
| 354 |
msgstr "MT-Safe" |
| 355 |
|
| 356 |
#. type: SH |
| 357 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 358 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 359 |
#, no-wrap |
| 360 |
msgid "VERSIONS" |
| 361 |
msgstr "VERSIONS" |
| 362 |
|
| 363 |
#. type: Plain text |
| 364 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 365 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 366 |
msgid "" |
| 367 |
"On Linux, cancelation is implemented using signals. Under the NPTL " |
| 368 |
"threading implementation, the first real-time signal (i.e., signal 32) is " |
| 369 |
"used for this purpose. On LinuxThreads, the second real-time signal is " |
| 370 |
"used, if real-time signals are available, otherwise B<SIGUSR2> is used." |
| 371 |
msgstr "" |
| 372 |
"Sous Linux, l'annulation est implémentée par des signaux. Avec " |
| 373 |
"l'implémentation NPTL, le premier signal temps-réel (c'est-à-dire le signal " |
| 374 |
"32) est utilisé dans ce but. Avec LinuxThreads, le second signal temps-réel " |
| 375 |
"est utilisé, si les signaux temps-réels sont disponibles, sinon B<SIGUSR2> " |
| 376 |
"est utilisé à la place." |
| 377 |
|
| 378 |
#. type: SH |
| 379 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 380 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 381 |
#, no-wrap |
| 382 |
msgid "STANDARDS" |
| 383 |
msgstr "NORMES" |
| 384 |
|
| 385 |
#. type: Plain text |
| 386 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 387 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 388 |
msgid "POSIX.1-2008." |
| 389 |
msgstr "POSIX.1-2008." |
| 390 |
|
| 391 |
#. type: SH |
| 392 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 393 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 394 |
#, no-wrap |
| 395 |
msgid "HISTORY" |
| 396 |
msgstr "HISTORIQUE" |
| 397 |
|
| 398 |
#. type: Plain text |
| 399 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 400 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 401 |
msgid "glibc 2.0 POSIX.1-2001." |
| 402 |
msgstr "glibc 2.0 POSIX.1-2001." |
| 403 |
|
| 404 |
#. type: SH |
| 405 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 406 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 407 |
#, no-wrap |
| 408 |
msgid "EXAMPLES" |
| 409 |
msgstr "EXEMPLES" |
| 410 |
|
| 411 |
#. type: Plain text |
| 412 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 413 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 414 |
msgid "" |
| 415 |
"The program below creates a thread and then cancels it. The main thread " |
| 416 |
"joins with the canceled thread to check that its exit status was " |
| 417 |
"B<PTHREAD_CANCELED>. The following shell session shows what happens when we " |
| 418 |
"run the program:" |
| 419 |
msgstr "" |
| 420 |
"Le programme ci-dessous crée un thread puis l'annule. Le thread principal " |
| 421 |
"joint le thread annulé pour vérifier que son état de sortie était bien " |
| 422 |
"B<PTHREAD_CANCELED>. La session suivante montre un exemple d'exécution\\ :" |
| 423 |
|
| 424 |
#. type: Plain text |
| 425 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 426 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 427 |
#, no-wrap |
| 428 |
msgid "" |
| 429 |
"$ ./a.out\n" |
| 430 |
"thread_func(): started; cancelation disabled\n" |
| 431 |
"main(): sending cancelation request\n" |
| 432 |
"thread_func(): about to enable cancelation\n" |
| 433 |
"main(): thread was canceled\n" |
| 434 |
msgstr "" |
| 435 |
"$ ./a.out\n" |
| 436 |
"thread_func(): démarré\\ ; annulation désactivée\n" |
| 437 |
"main(): envoi d'une requête d'annulation\n" |
| 438 |
"thread_func(): sur le point d'activer l'annulation\n" |
| 439 |
"main(): le thread a été annulé\n" |
| 440 |
|
| 441 |
#. type: SS |
| 442 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 443 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 444 |
#, no-wrap |
| 445 |
msgid "Program source" |
| 446 |
msgstr "Source du programme" |
| 447 |
|
| 448 |
#. type: Plain text |
| 449 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 450 |
#: opensuse-tumbleweed |
| 451 |
#, fuzzy, no-wrap |
| 452 |
#| msgid "" |
| 453 |
#| "#include E<lt>errno.hE<gt>\n" |
| 454 |
#| "#include E<lt>pthread.hE<gt>\n" |
| 455 |
#| "#include E<lt>stdio.hE<gt>\n" |
| 456 |
#| "#include E<lt>stdlib.hE<gt>\n" |
| 457 |
#| "#include E<lt>unistd.hE<gt>\n" |
| 458 |
#| "\\&\n" |
| 459 |
#| "#define handle_error_en(en, msg) \\[rs]\n" |
| 460 |
#| " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n" |
| 461 |
#| "\\&\n" |
| 462 |
#| "static void *\n" |
| 463 |
#| "thread_func(void *ignored_argument)\n" |
| 464 |
#| "{\n" |
| 465 |
#| " int s;\n" |
| 466 |
#| "\\&\n" |
| 467 |
#| " /* Disable cancelation for a while, so that we don\\[aq]t\n" |
| 468 |
#| " immediately react to a cancelation request. */\n" |
| 469 |
#| "\\&\n" |
| 470 |
#| " s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n" |
| 471 |
#| " if (s != 0)\n" |
| 472 |
#| " handle_error_en(s, \"pthread_setcancelstate\");\n" |
| 473 |
#| "\\&\n" |
| 474 |
#| " printf(\"%s(): started; cancelation disabled\\[rs]n\", __func__);\n" |
| 475 |
#| " sleep(5);\n" |
| 476 |
#| " printf(\"%s(): about to enable cancelation\\[rs]n\", __func__);\n" |
| 477 |
#| "\\&\n" |
| 478 |
#| " s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n" |
| 479 |
#| " if (s != 0)\n" |
| 480 |
#| " handle_error_en(s, \"pthread_setcancelstate\");\n" |
| 481 |
#| "\\&\n" |
| 482 |
#| " /* sleep() is a cancelation point. */\n" |
| 483 |
#| "\\&\n" |
| 484 |
#| " sleep(1000); /* Should get canceled while we sleep */\n" |
| 485 |
#| "\\&\n" |
| 486 |
#| " /* Should never get here. */\n" |
| 487 |
#| "\\&\n" |
| 488 |
#| " printf(\"%s(): not canceled!\\[rs]n\", __func__);\n" |
| 489 |
#| " return NULL;\n" |
| 490 |
#| "}\n" |
| 491 |
#| "\\&\n" |
| 492 |
#| "int\n" |
| 493 |
#| "main(void)\n" |
| 494 |
#| "{\n" |
| 495 |
#| " pthread_t thr;\n" |
| 496 |
#| " void *res;\n" |
| 497 |
#| " int s;\n" |
| 498 |
#| "\\&\n" |
| 499 |
#| " /* Start a thread and then send it a cancelation request. */\n" |
| 500 |
#| "\\&\n" |
| 501 |
#| " s = pthread_create(&thr, NULL, &thread_func, NULL);\n" |
| 502 |
#| " if (s != 0)\n" |
| 503 |
#| " handle_error_en(s, \"pthread_create\");\n" |
| 504 |
#| "\\&\n" |
| 505 |
#| " sleep(2); /* Give thread a chance to get started */\n" |
| 506 |
#| "\\&\n" |
| 507 |
#| " printf(\"%s(): sending cancelation request\\[rs]n\", __func__);\n" |
| 508 |
#| " s = pthread_cancel(thr);\n" |
| 509 |
#| " if (s != 0)\n" |
| 510 |
#| " handle_error_en(s, \"pthread_cancel\");\n" |
| 511 |
#| "\\&\n" |
| 512 |
#| " /* Join with thread to see what its exit status was. */\n" |
| 513 |
#| "\\&\n" |
| 514 |
#| " s = pthread_join(thr, &res);\n" |
| 515 |
#| " if (s != 0)\n" |
| 516 |
#| " handle_error_en(s, \"pthread_join\");\n" |
| 517 |
#| "\\&\n" |
| 518 |
#| " if (res == PTHREAD_CANCELED)\n" |
| 519 |
#| " printf(\"%s(): thread was canceled\\[rs]n\", __func__);\n" |
| 520 |
#| " else\n" |
| 521 |
#| " printf(\"%s(): thread wasn\\[aq]t canceled (shouldn\\[aq]t happen!)\\[rs]n\",\n" |
| 522 |
#| " __func__);\n" |
| 523 |
#| " exit(EXIT_SUCCESS);\n" |
| 524 |
#| "}\n" |
| 525 |
msgid "" |
| 526 |
"#include E<lt>err.hE<gt>\n" |
| 527 |
"#include E<lt>pthread.hE<gt>\n" |
| 528 |
"#include E<lt>stdio.hE<gt>\n" |
| 529 |
"#include E<lt>stdlib.hE<gt>\n" |
| 530 |
"#include E<lt>unistd.hE<gt>\n" |
| 531 |
"\\&\n" |
| 532 |
"static void *\n" |
| 533 |
"thread_func(void *ignored_argument)\n" |
| 534 |
"{\n" |
| 535 |
" int s;\n" |
| 536 |
"\\&\n" |
| 537 |
" /* Disable cancelation for a while, so that we don\\[aq]t\n" |
| 538 |
" immediately react to a cancelation request. */\n" |
| 539 |
"\\&\n" |
| 540 |
" s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n" |
| 541 |
" if (s != 0)\n" |
| 542 |
" errc(EXIT_FAILURE, s, \"pthread_setcancelstate\");\n" |
| 543 |
"\\&\n" |
| 544 |
" printf(\"%s(): started; cancelation disabled\\[rs]n\", __func__);\n" |
| 545 |
" sleep(5);\n" |
| 546 |
" printf(\"%s(): about to enable cancelation\\[rs]n\", __func__);\n" |
| 547 |
"\\&\n" |
| 548 |
" s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n" |
| 549 |
" if (s != 0)\n" |
| 550 |
" errc(EXIT_FAILURE, s, \"pthread_setcancelstate\");\n" |
| 551 |
"\\&\n" |
| 552 |
" /* sleep() is a cancelation point. */\n" |
| 553 |
"\\&\n" |
| 554 |
" sleep(1000); /* Should get canceled while we sleep */\n" |
| 555 |
"\\&\n" |
| 556 |
" /* Should never get here. */\n" |
| 557 |
"\\&\n" |
| 558 |
" printf(\"%s(): not canceled!\\[rs]n\", __func__);\n" |
| 559 |
" return NULL;\n" |
| 560 |
"}\n" |
| 561 |
"\\&\n" |
| 562 |
"int\n" |
| 563 |
"main(void)\n" |
| 564 |
"{\n" |
| 565 |
" pthread_t thr;\n" |
| 566 |
" void *res;\n" |
| 567 |
" int s;\n" |
| 568 |
"\\&\n" |
| 569 |
" /* Start a thread and then send it a cancelation request. */\n" |
| 570 |
"\\&\n" |
| 571 |
" s = pthread_create(&thr, NULL, &thread_func, NULL);\n" |
| 572 |
" if (s != 0)\n" |
| 573 |
" errc(EXIT_FAILURE, s, \"pthread_create\");\n" |
| 574 |
"\\&\n" |
| 575 |
" sleep(2); /* Give thread a chance to get started */\n" |
| 576 |
"\\&\n" |
| 577 |
" printf(\"%s(): sending cancelation request\\[rs]n\", __func__);\n" |
| 578 |
" s = pthread_cancel(thr);\n" |
| 579 |
" if (s != 0)\n" |
| 580 |
" errc(EXIT_FAILURE, s, \"pthread_cancel\");\n" |
| 581 |
"\\&\n" |
| 582 |
" /* Join with thread to see what its exit status was. */\n" |
| 583 |
"\\&\n" |
| 584 |
" s = pthread_join(thr, &res);\n" |
| 585 |
" if (s != 0)\n" |
| 586 |
" errc(EXIT_FAILURE, s, \"pthread_join\");\n" |
| 587 |
"\\&\n" |
| 588 |
" if (res == PTHREAD_CANCELED)\n" |
| 589 |
" printf(\"%s(): thread was canceled\\[rs]n\", __func__);\n" |
| 590 |
" else\n" |
| 591 |
" printf(\"%s(): thread wasn\\[aq]t canceled (shouldn\\[aq]t happen!)\\[rs]n\",\n" |
| 592 |
" __func__);\n" |
| 593 |
" exit(EXIT_SUCCESS);\n" |
| 594 |
"}\n" |
| 595 |
msgstr "" |
| 596 |
"#include E<lt>errno.hE<gt>\n" |
| 597 |
"#include E<lt>pthread.hE<gt>\n" |
| 598 |
"#include E<lt>stdio.hE<gt>\n" |
| 599 |
"#include E<lt>stdlib.hE<gt>\n" |
| 600 |
"#include E<lt>unistd.hE<gt>\n" |
| 601 |
"\\&\n" |
| 602 |
"#define handle_error_en(en, msg) \\[rs]\n" |
| 603 |
" do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n" |
| 604 |
"\\&\n" |
| 605 |
"static void *\n" |
| 606 |
"thread_func(void *ignored_argument)\n" |
| 607 |
"{\n" |
| 608 |
" int s;\n" |
| 609 |
"\\&\n" |
| 610 |
" /* Désactiver l'annulation pendant un certain temps, pour\n" |
| 611 |
" éviter une réaction immédiate à une requête d'annulation. */\n" |
| 612 |
"\\&\n" |
| 613 |
" s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n" |
| 614 |
" if (s != 0)\n" |
| 615 |
" handle_error_en(s, \"pthread_setcancelstate\");\n" |
| 616 |
"\\&\n" |
| 617 |
" printf(\"%s() : démarré\\ ; annulation désactivée\\[rs]n\", __func__);\n" |
| 618 |
" sleep(5);\n" |
| 619 |
" printf(\"%s() : sur le point d'activer l'annulation\\[rs]n\", __func__);\n" |
| 620 |
"\\&\n" |
| 621 |
" s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n" |
| 622 |
" if (s != 0)\n" |
| 623 |
" handle_error_en(s, \"pthread_setcancelstate\");\n" |
| 624 |
"\\&\n" |
| 625 |
" /* sleep() est un point d'annulation. */\n" |
| 626 |
"\\&\n" |
| 627 |
" sleep(1000); /* Devrait être annulé pendant la période de sommeil */\n" |
| 628 |
"\\&\n" |
| 629 |
" /* Cela ne devrait jamais se produire. */\n" |
| 630 |
"\\&\n" |
| 631 |
" printf(\"%s() : pas annulé\\ !\\[rs]n\", __func__);\n" |
| 632 |
" return NULL;\n" |
| 633 |
"}\n" |
| 634 |
"\\&\n" |
| 635 |
"int\n" |
| 636 |
"main(void)\n" |
| 637 |
"{\n" |
| 638 |
" pthread_t thr;\n" |
| 639 |
" void *res;\n" |
| 640 |
" int s;\n" |
| 641 |
"\\&\n" |
| 642 |
" /* Démarrer un thread et lui envoyer une requête d'annulation. */\n" |
| 643 |
"\\&\n" |
| 644 |
" s = pthread_create(&thr, NULL, &thread_func, NULL);\n" |
| 645 |
" if (s != 0)\n" |
| 646 |
" handle_error_en(s, \"pthread_create\");\n" |
| 647 |
"\\&\n" |
| 648 |
" sleep(2); /* Donner au thread l'occasion de démarrer */\n" |
| 649 |
"\\&\n" |
| 650 |
" printf(\"%s() : envoi d'une requête d'annulation\\[rs]n\", __func__);\n" |
| 651 |
" s = pthread_cancel(thr);\n" |
| 652 |
" if (s != 0)\n" |
| 653 |
" handle_error_en(s, \"pthread_cancel\");\n" |
| 654 |
"\\&\n" |
| 655 |
" /* Joindre le thread pour vérifier son état de sortie. */\n" |
| 656 |
"\\&\n" |
| 657 |
" s = pthread_join(thr, &res);\n" |
| 658 |
" if (s != 0)\n" |
| 659 |
" handle_error_en(s, \"pthread_join\");\n" |
| 660 |
"\\&\n" |
| 661 |
" if (res == PTHREAD_CANCELED)\n" |
| 662 |
" printf(\"%s() : le thread a été annulé\\[rs]n\", __func__);\n" |
| 663 |
" else\n" |
| 664 |
" printf(\"%s() : le thread n'a pas été annulé (cela ne devrait pas arriver\\ !)\\[rs]n\",\n" |
| 665 |
" __func__);\n" |
| 666 |
" exit(EXIT_SUCCESS);\n" |
| 667 |
"}\n" |
| 668 |
|
| 669 |
#. SRC END |
| 670 |
#. type: SH |
| 671 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 672 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 673 |
#, no-wrap |
| 674 |
msgid "SEE ALSO" |
| 675 |
msgstr "VOIR AUSSI" |
| 676 |
|
| 677 |
#. type: Plain text |
| 678 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 679 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 680 |
msgid "" |
| 681 |
"B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), " |
| 682 |
"B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), " |
| 683 |
"B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)" |
| 684 |
msgstr "" |
| 685 |
"B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), " |
| 686 |
"B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), " |
| 687 |
"B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)" |
| 688 |
|
| 689 |
#. type: TH |
| 690 |
#: debian-trixie |
| 691 |
#, no-wrap |
| 692 |
msgid "2024-06-15" |
| 693 |
msgstr "15 juin 2024" |
| 694 |
|
| 695 |
#. type: TH |
| 696 |
#: debian-trixie |
| 697 |
#, no-wrap |
| 698 |
msgid "Linux man-pages 6.9.1" |
| 699 |
msgstr "Pages du manuel de Linux 6.9.1" |
| 700 |
|
| 701 |
#. type: Plain text |
| 702 |
#: debian-trixie |
| 703 |
msgid "POSIX threads library (I<libpthread>, I<-lpthread>)" |
| 704 |
msgstr "Bibliothèque de threads POSIX (I<libpthread>, I<-lpthread>)" |
| 705 |
|
| 706 |
#. type: Plain text |
| 707 |
#: debian-trixie |
| 708 |
msgid "" |
| 709 |
"When a cancelation requested is acted on, the following steps occur for " |
| 710 |
"I<thread> (in this order):" |
| 711 |
msgstr "" |
| 712 |
"Quand une requête d'annulation est traitée, les étapes suivantes sont " |
| 713 |
"effectuées pour I<thread> (dans cet ordre)\\ :" |
| 714 |
|
| 715 |
#. type: Plain text |
| 716 |
#: debian-trixie fedora-44 fedora-rawhide |
| 717 |
#, no-wrap |
| 718 |
msgid "" |
| 719 |
"#include E<lt>errno.hE<gt>\n" |
| 720 |
"#include E<lt>pthread.hE<gt>\n" |
| 721 |
"#include E<lt>stdio.hE<gt>\n" |
| 722 |
"#include E<lt>stdlib.hE<gt>\n" |
| 723 |
"#include E<lt>unistd.hE<gt>\n" |
| 724 |
"\\&\n" |
| 725 |
"#define handle_error_en(en, msg) \\[rs]\n" |
| 726 |
" do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n" |
| 727 |
"\\&\n" |
| 728 |
"static void *\n" |
| 729 |
"thread_func(void *ignored_argument)\n" |
| 730 |
"{\n" |
| 731 |
" int s;\n" |
| 732 |
"\\&\n" |
| 733 |
" /* Disable cancelation for a while, so that we don\\[aq]t\n" |
| 734 |
" immediately react to a cancelation request. */\n" |
| 735 |
"\\&\n" |
| 736 |
" s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n" |
| 737 |
" if (s != 0)\n" |
| 738 |
" handle_error_en(s, \"pthread_setcancelstate\");\n" |
| 739 |
"\\&\n" |
| 740 |
" printf(\"%s(): started; cancelation disabled\\[rs]n\", __func__);\n" |
| 741 |
" sleep(5);\n" |
| 742 |
" printf(\"%s(): about to enable cancelation\\[rs]n\", __func__);\n" |
| 743 |
"\\&\n" |
| 744 |
" s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n" |
| 745 |
" if (s != 0)\n" |
| 746 |
" handle_error_en(s, \"pthread_setcancelstate\");\n" |
| 747 |
"\\&\n" |
| 748 |
" /* sleep() is a cancelation point. */\n" |
| 749 |
"\\&\n" |
| 750 |
" sleep(1000); /* Should get canceled while we sleep */\n" |
| 751 |
"\\&\n" |
| 752 |
" /* Should never get here. */\n" |
| 753 |
"\\&\n" |
| 754 |
" printf(\"%s(): not canceled!\\[rs]n\", __func__);\n" |
| 755 |
" return NULL;\n" |
| 756 |
"}\n" |
| 757 |
"\\&\n" |
| 758 |
"int\n" |
| 759 |
"main(void)\n" |
| 760 |
"{\n" |
| 761 |
" pthread_t thr;\n" |
| 762 |
" void *res;\n" |
| 763 |
" int s;\n" |
| 764 |
"\\&\n" |
| 765 |
" /* Start a thread and then send it a cancelation request. */\n" |
| 766 |
"\\&\n" |
| 767 |
" s = pthread_create(&thr, NULL, &thread_func, NULL);\n" |
| 768 |
" if (s != 0)\n" |
| 769 |
" handle_error_en(s, \"pthread_create\");\n" |
| 770 |
"\\&\n" |
| 771 |
" sleep(2); /* Give thread a chance to get started */\n" |
| 772 |
"\\&\n" |
| 773 |
" printf(\"%s(): sending cancelation request\\[rs]n\", __func__);\n" |
| 774 |
" s = pthread_cancel(thr);\n" |
| 775 |
" if (s != 0)\n" |
| 776 |
" handle_error_en(s, \"pthread_cancel\");\n" |
| 777 |
"\\&\n" |
| 778 |
" /* Join with thread to see what its exit status was. */\n" |
| 779 |
"\\&\n" |
| 780 |
" s = pthread_join(thr, &res);\n" |
| 781 |
" if (s != 0)\n" |
| 782 |
" handle_error_en(s, \"pthread_join\");\n" |
| 783 |
"\\&\n" |
| 784 |
" if (res == PTHREAD_CANCELED)\n" |
| 785 |
" printf(\"%s(): thread was canceled\\[rs]n\", __func__);\n" |
| 786 |
" else\n" |
| 787 |
" printf(\"%s(): thread wasn\\[aq]t canceled (shouldn\\[aq]t happen!)\\[rs]n\",\n" |
| 788 |
" __func__);\n" |
| 789 |
" exit(EXIT_SUCCESS);\n" |
| 790 |
"}\n" |
| 791 |
msgstr "" |
| 792 |
"#include E<lt>errno.hE<gt>\n" |
| 793 |
"#include E<lt>pthread.hE<gt>\n" |
| 794 |
"#include E<lt>stdio.hE<gt>\n" |
| 795 |
"#include E<lt>stdlib.hE<gt>\n" |
| 796 |
"#include E<lt>unistd.hE<gt>\n" |
| 797 |
"\\&\n" |
| 798 |
"#define handle_error_en(en, msg) \\[rs]\n" |
| 799 |
" do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n" |
| 800 |
"\\&\n" |
| 801 |
"static void *\n" |
| 802 |
"thread_func(void *ignored_argument)\n" |
| 803 |
"{\n" |
| 804 |
" int s;\n" |
| 805 |
"\\&\n" |
| 806 |
" /* Désactiver l'annulation pendant un certain temps, pour\n" |
| 807 |
" éviter une réaction immédiate à une requête d'annulation. */\n" |
| 808 |
"\\&\n" |
| 809 |
" s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n" |
| 810 |
" if (s != 0)\n" |
| 811 |
" handle_error_en(s, \"pthread_setcancelstate\");\n" |
| 812 |
"\\&\n" |
| 813 |
" printf(\"%s() : démarré\\ ; annulation désactivée\\[rs]n\", __func__);\n" |
| 814 |
" sleep(5);\n" |
| 815 |
" printf(\"%s() : sur le point d'activer l'annulation\\[rs]n\", __func__);\n" |
| 816 |
"\\&\n" |
| 817 |
" s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n" |
| 818 |
" if (s != 0)\n" |
| 819 |
" handle_error_en(s, \"pthread_setcancelstate\");\n" |
| 820 |
"\\&\n" |
| 821 |
" /* sleep() est un point d'annulation. */\n" |
| 822 |
"\\&\n" |
| 823 |
" sleep(1000); /* Devrait être annulé pendant la période de sommeil */\n" |
| 824 |
"\\&\n" |
| 825 |
" /* Cela ne devrait jamais se produire. */\n" |
| 826 |
"\\&\n" |
| 827 |
" printf(\"%s() : pas annulé\\ !\\[rs]n\", __func__);\n" |
| 828 |
" return NULL;\n" |
| 829 |
"}\n" |
| 830 |
"\\&\n" |
| 831 |
"int\n" |
| 832 |
"main(void)\n" |
| 833 |
"{\n" |
| 834 |
" pthread_t thr;\n" |
| 835 |
" void *res;\n" |
| 836 |
" int s;\n" |
| 837 |
"\\&\n" |
| 838 |
" /* Démarrer un thread et lui envoyer une requête d'annulation. */\n" |
| 839 |
"\\&\n" |
| 840 |
" s = pthread_create(&thr, NULL, &thread_func, NULL);\n" |
| 841 |
" if (s != 0)\n" |
| 842 |
" handle_error_en(s, \"pthread_create\");\n" |
| 843 |
"\\&\n" |
| 844 |
" sleep(2); /* Donner au thread l'occasion de démarrer */\n" |
| 845 |
"\\&\n" |
| 846 |
" printf(\"%s() : envoi d'une requête d'annulation\\[rs]n\", __func__);\n" |
| 847 |
" s = pthread_cancel(thr);\n" |
| 848 |
" if (s != 0)\n" |
| 849 |
" handle_error_en(s, \"pthread_cancel\");\n" |
| 850 |
"\\&\n" |
| 851 |
" /* Joindre le thread pour vérifier son état de sortie. */\n" |
| 852 |
"\\&\n" |
| 853 |
" s = pthread_join(thr, &res);\n" |
| 854 |
" if (s != 0)\n" |
| 855 |
" handle_error_en(s, \"pthread_join\");\n" |
| 856 |
"\\&\n" |
| 857 |
" if (res == PTHREAD_CANCELED)\n" |
| 858 |
" printf(\"%s() : le thread a été annulé\\[rs]n\", __func__);\n" |
| 859 |
" else\n" |
| 860 |
" printf(\"%s() : le thread n'a pas été annulé (cela ne devrait pas arriver\\ !)\\[rs]n\",\n" |
| 861 |
" __func__);\n" |
| 862 |
" exit(EXIT_SUCCESS);\n" |
| 863 |
"}\n" |
| 864 |
|
| 865 |
#. type: TH |
| 866 |
#: fedora-44 fedora-rawhide |
| 867 |
#, no-wrap |
| 868 |
msgid "2024-11-05" |
| 869 |
msgstr "5 novembre 2024" |
| 870 |
|
| 871 |
#. type: TH |
| 872 |
#: fedora-44 fedora-rawhide |
| 873 |
#, no-wrap |
| 874 |
msgid "Linux man-pages 6.13" |
| 875 |
msgstr "Pages du manuel de Linux 6.13" |
| 876 |
|
| 877 |
#. type: TH |
| 878 |
#: mageia-cauldron |
| 879 |
#, no-wrap |
| 880 |
msgid "Linux man-pages 6.17" |
| 881 |
msgstr "Pages du manuel de Linux 6.17" |
| 882 |
|
| 883 |
#. type: TH |
| 884 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 885 |
#, no-wrap |
| 886 |
msgid "Linux man-pages (unreleased)" |
| 887 |
msgstr "Pages du manuel de Linux (non publiées)" |