Debian Codegraph @

po/ar/man3/pthread_sigmask.3.po

raw
1 # Arabic translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # زايد السعيدي <[email protected]>, 2026.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.30.2\n"
8 "POT-Creation-Date: 2026-06-05 06:38+0200\n"
9 "PO-Revision-Date: 2026-06-03 06:42+0400\n"
10 "Last-Translator: Zayed Al-Saidi <[email protected]>\n"
11 "Language-Team: Arabic <[email protected]>\n"
12 "Language: ar\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
17 "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
18 "X-Generator: Lokalize 23.08.5\n"
19
20 #. type: TH
21 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
22 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
23 #, no-wrap
24 msgid "pthread_sigmask"
25 msgstr "pthread_sigmask"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2025-09-21"
32 msgstr "21 سبتمبر 2025"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "صفحات دليل لينكس 6.18"
39
40 #. type: SH
41 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
42 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
43 #, no-wrap
44 msgid "NAME"
45 msgstr "الاسم"
46
47 #. type: Plain text
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 msgid "pthread_sigmask - examine and change mask of blocked signals"
51 msgstr "pthread_sigmask - فحص وتغيير قناع الإشارات المحجوبة"
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 "LIBRARY"
58 msgstr "المكتبة"
59
60 #. type: Plain text
61 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
62 #: opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "POSIX threads library (I<libpthread>,\\ I<-lpthread>)"
64 msgstr "مكتبة مسالك POSIX (I<libpthread>،\\ I<-lpthread>)"
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 "SYNOPSIS"
71 msgstr "موجز"
72
73 #. type: Plain text
74 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
75 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
76 #, no-wrap
77 msgid "B<#include E<lt>signal.hE<gt>>\n"
78 msgstr "B<#include E<lt>signal.hE<gt>>\n"
79
80 #. type: Plain text
81 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
82 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
83 #, no-wrap
84 msgid "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
85 msgstr "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
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 msgid ""
91 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
92 msgstr ""
93 "متطلبات ماكروات اختبار الميزات لـ glibc (انظر B<feature_test_macros>(7)):"
94
95 #. type: Plain text
96 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
97 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
98 msgid "B<pthread_sigmask>():"
99 msgstr "B<pthread_sigmask>():"
100
101 #. type: Plain text
102 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
103 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
104 #, no-wrap
105 msgid " _POSIX_C_SOURCE E<gt>= 199506L || _XOPEN_SOURCE E<gt>= 500\n"
106 msgstr " _POSIX_C_SOURCE E<gt>= 199506L || _XOPEN_SOURCE E<gt>= 500\n"
107
108 #. type: SH
109 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
110 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
111 #, no-wrap
112 msgid "DESCRIPTION"
113 msgstr "الوصف"
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 "The B<pthread_sigmask>() function is just like B<sigprocmask>(2), with the "
120 "difference that its use in multithreaded programs is explicitly specified by "
121 "POSIX.1. Other differences are noted in this page."
122 msgstr ""
123 "الدالة B<pthread_sigmask>() تشبه تمامًا B<sigprocmask>(2)، مع الفارق أن "
124 "استخدامها في البرامج متعددة الخيوط محدد صراحةً بواسطة POSIX.1. الفروق الأخرى "
125 "مذكورة في هذه الصفحة."
126
127 #. type: Plain text
128 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
129 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
130 msgid ""
131 "For a description of the arguments and operation of this function, see "
132 "B<sigprocmask>(2)."
133 msgstr "لوصف المعاملات وتشغيل هذه الدالة، انظر B<sigprocmask>(2)."
134
135 #. type: SH
136 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
137 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
138 #, no-wrap
139 msgid "RETURN VALUE"
140 msgstr "قيمة الإرجاع"
141
142 #. type: Plain text
143 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
144 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
145 msgid ""
146 "On success, B<pthread_sigmask>() returns 0; on error, it returns an error "
147 "number."
148 msgstr "عند النجاح، تُرجع B<pthread_sigmask>() 0؛ عند الخطأ، تُرجع رقم خطأ."
149
150 #. type: SH
151 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
152 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
153 #, no-wrap
154 msgid "ERRORS"
155 msgstr "الأخطاء"
156
157 #. type: Plain text
158 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
159 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
160 msgid "See B<sigprocmask>(2)."
161 msgstr "انظر B<sigprocmask>(2)."
162
163 #. type: SH
164 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
165 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
166 #, no-wrap
167 msgid "ATTRIBUTES"
168 msgstr "السمات"
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 "For an explanation of the terms used in this section, see B<attributes>(7)."
175 msgstr ""
176 "للاطلاع على شرح للمصطلحات المستخدمة في هذا القسم، انظر B<attributes>(7)."
177
178 #. type: tbl table
179 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
180 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
181 #, no-wrap
182 msgid "Interface"
183 msgstr "الواجهة"
184
185 #. type: tbl table
186 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
187 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
188 #, no-wrap
189 msgid "Attribute"
190 msgstr "السمة"
191
192 #. type: tbl table
193 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
194 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
195 #, no-wrap
196 msgid "Value"
197 msgstr "القيمة"
198
199 #. type: tbl table
200 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
201 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
202 #, no-wrap
203 msgid ".na\n"
204 msgstr ".na\n"
205
206 #. type: tbl table
207 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
208 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
209 #, no-wrap
210 msgid ".nh\n"
211 msgstr ".nh\n"
212
213 #. type: tbl table
214 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
215 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
216 #, no-wrap
217 msgid "B<pthread_sigmask>()"
218 msgstr "B<pthread_sigmask>()"
219
220 #. type: tbl table
221 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
222 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
223 #, no-wrap
224 msgid "Thread safety"
225 msgstr "سلامة الخيوط"
226
227 #. type: tbl table
228 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
229 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
230 #, no-wrap
231 msgid "MT-Safe"
232 msgstr "MT-Safe"
233
234 #. type: SH
235 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
236 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
237 #, no-wrap
238 msgid "STANDARDS"
239 msgstr "المعايير"
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 "POSIX.1-2008."
245 msgstr "POSIX.1-2008."
246
247 #. type: SH
248 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
249 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
250 #, no-wrap
251 msgid "HISTORY"
252 msgstr "التاريخ"
253
254 #. type: Plain text
255 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
256 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
257 msgid "POSIX.1-2001."
258 msgstr "POSIX.1-2001."
259
260 #. type: SH
261 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
262 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
263 #, no-wrap
264 msgid "NOTES"
265 msgstr "ملاحظات"
266
267 #. type: Plain text
268 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
269 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
270 msgid "A new thread inherits a copy of its creator's signal mask."
271 msgstr "يرث الخيط الجديد نسخة من قناع الإشارات لمنشئه."
272
273 #. type: Plain text
274 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
275 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
276 msgid ""
277 "The glibc B<pthread_sigmask>() function silently ignores attempts to block "
278 "the two real-time signals that are used internally by the NPTL threading "
279 "implementation. See B<nptl>(7) for details."
280 msgstr ""
281 "تتجاهل دالة glibc B<pthread_sigmask>() بصمت محاولات حجب إشارتي الوقت الفعلي "
282 "المستخدمتين داخليًا بواسطة تطبيق الخيوط NPTL. انظر B<nptl>(7) للتفاصيل."
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 "EXAMPLES"
289 msgstr "أمثلة"
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 "The program below blocks some signals in the main thread, and then creates a "
296 "dedicated thread to fetch those signals via B<sigwait>(3). The following "
297 "shell session demonstrates its use:"
298 msgstr ""
299 "يحجب البرنامج أدناه بعض الإشارات في الخيط الرئيس، ثم ينشئ خيطًا مخصصًا لجلب "
300 "تلك الإشارات عبر B<sigwait>(3). توضح جلسة الصدفة التالية استخدامه:"
301
302 #. type: Plain text
303 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
304 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
305 #, no-wrap
306 msgid ""
307 "$B< ./a.out &>\n"
308 "[1] 5423\n"
309 "$B< kill -QUIT %1>\n"
310 "Signal handling thread got signal 3\n"
311 "$B< kill -USR1 %1>\n"
312 "Signal handling thread got signal 10\n"
313 "$B< kill -TERM %1>\n"
314 "[1]+ Terminated ./a.out\n"
315 msgstr ""
316 "$B< ./a.out &>\n"
317 "[1] 5423\n"
318 "$B< kill -QUIT %1>\n"
319 "Signal handling thread got signal 3\n"
320 "$B< kill -USR1 %1>\n"
321 "Signal handling thread got signal 10\n"
322 "$B< kill -TERM %1>\n"
323 "[1]+ Terminated ./a.out\n"
324
325 #. type: SS
326 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
327 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
328 #, no-wrap
329 msgid "Program source"
330 msgstr "مصدر البرنامج"
331
332 #. type: Plain text
333 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
334 #: opensuse-tumbleweed
335 #, no-wrap
336 msgid ""
337 "#include E<lt>err.hE<gt>\n"
338 "#include E<lt>errno.hE<gt>\n"
339 "#include E<lt>pthread.hE<gt>\n"
340 "#include E<lt>signal.hE<gt>\n"
341 "#include E<lt>stdio.hE<gt>\n"
342 "#include E<lt>stdlib.hE<gt>\n"
343 "#include E<lt>unistd.hE<gt>\n"
344 "\\&\n"
345 "/* Simple error handling functions */\n"
346 "\\&\n"
347 "static void *\n"
348 "sig_thread(void *arg)\n"
349 "{\n"
350 " sigset_t *set = arg;\n"
351 " int s, sig;\n"
352 "\\&\n"
353 " for (;;) {\n"
354 " s = sigwait(set, &sig);\n"
355 " if (s != 0)\n"
356 " errc(EXIT_FAILURE, s, \"sigwait\");\n"
357 " printf(\"Signal handling thread got signal %d\\[rs]n\", sig);\n"
358 " }\n"
359 "}\n"
360 "\\&\n"
361 "int\n"
362 "main(void)\n"
363 "{\n"
364 " pthread_t thread;\n"
365 " sigset_t set;\n"
366 " int s;\n"
367 "\\&\n"
368 " /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
369 " will inherit a copy of the signal mask. */\n"
370 "\\&\n"
371 " sigemptyset(&set);\n"
372 " sigaddset(&set, SIGQUIT);\n"
373 " sigaddset(&set, SIGUSR1);\n"
374 " s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
375 " if (s != 0)\n"
376 " errc(EXIT_FAILURE, s, \"pthread_sigmask\");\n"
377 "\\&\n"
378 " s = pthread_create(&thread, NULL, &sig_thread, &set);\n"
379 " if (s != 0)\n"
380 " errc(EXIT_FAILURE, s, \"pthread_create\");\n"
381 "\\&\n"
382 " /* Main thread carries on to create other threads and/or do\n"
383 " other work. */\n"
384 "\\&\n"
385 " pause(); /* Dummy pause so we can test program */\n"
386 "}\n"
387 msgstr ""
388 "#include E<lt>err.hE<gt>\n"
389 "#include E<lt>errno.hE<gt>\n"
390 "#include E<lt>pthread.hE<gt>\n"
391 "#include E<lt>signal.hE<gt>\n"
392 "#include E<lt>stdio.hE<gt>\n"
393 "#include E<lt>stdlib.hE<gt>\n"
394 "#include E<lt>unistd.hE<gt>\n"
395 "\\&\n"
396 "/* Simple error handling functions */\n"
397 "\\&\n"
398 "static void *\n"
399 "sig_thread(void *arg)\n"
400 "{\n"
401 " sigset_t *set = arg;\n"
402 " int s, sig;\n"
403 "\\&\n"
404 " for (;;) {\n"
405 " s = sigwait(set, &sig);\n"
406 " if (s != 0)\n"
407 " errc(EXIT_FAILURE, s, \"sigwait\");\n"
408 " printf(\"Signal handling thread got signal %d\\[rs]n\", sig);\n"
409 " }\n"
410 "}\n"
411 "\\&\n"
412 "int\n"
413 "main(void)\n"
414 "{\n"
415 " pthread_t thread;\n"
416 " sigset_t set;\n"
417 " int s;\n"
418 "\\&\n"
419 " /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
420 " will inherit a copy of the signal mask. */\n"
421 "\\&\n"
422 " sigemptyset(&set);\n"
423 " sigaddset(&set, SIGQUIT);\n"
424 " sigaddset(&set, SIGUSR1);\n"
425 " s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
426 " if (s != 0)\n"
427 " errc(EXIT_FAILURE, s, \"pthread_sigmask\");\n"
428 "\\&\n"
429 " s = pthread_create(&thread, NULL, &sig_thread, &set);\n"
430 " if (s != 0)\n"
431 " errc(EXIT_FAILURE, s, \"pthread_create\");\n"
432 "\\&\n"
433 " /* Main thread carries on to create other threads and/or do\n"
434 " other work. */\n"
435 "\\&\n"
436 " pause(); /* Dummy pause so we can test program */\n"
437 "}\n"
438
439 #. SRC END
440 #. type: SH
441 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
442 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
443 #, no-wrap
444 msgid "SEE ALSO"
445 msgstr "انظر أيضًا"
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 ""
451 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), "
452 "B<pthread_attr_setsigmask_np>(3), B<pthread_create>(3), B<pthread_kill>(3), "
453 "B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
454 msgstr ""
455 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), "
456 "B<pthread_attr_setsigmask_np>(3), B<pthread_create>(3), B<pthread_kill>(3), "
457 "B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
458
459 #. type: TH
460 #: debian-trixie
461 #, no-wrap
462 msgid "2024-06-15"
463 msgstr "15 يونيو 2024"
464
465 #. type: TH
466 #: debian-trixie
467 #, no-wrap
468 msgid "Linux man-pages 6.9.1"
469 msgstr "صفحات دليل لينكس 6.9.1"
470
471 #. type: Plain text
472 #: debian-trixie
473 msgid "POSIX threads library (I<libpthread>, I<-lpthread>)"
474 msgstr "مكتبة مسالك POSIX (I<libpthread>، I<-lpthread>)"
475
476 #. type: Plain text
477 #: debian-trixie fedora-44 fedora-rawhide
478 #, no-wrap
479 msgid ""
480 "#include E<lt>errno.hE<gt>\n"
481 "#include E<lt>pthread.hE<gt>\n"
482 "#include E<lt>signal.hE<gt>\n"
483 "#include E<lt>stdio.hE<gt>\n"
484 "#include E<lt>stdlib.hE<gt>\n"
485 "#include E<lt>unistd.hE<gt>\n"
486 "\\&\n"
487 "/* Simple error handling functions */\n"
488 "\\&\n"
489 "#define handle_error_en(en, msg) \\[rs]\n"
490 " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
491 "\\&\n"
492 "static void *\n"
493 "sig_thread(void *arg)\n"
494 "{\n"
495 " sigset_t *set = arg;\n"
496 " int s, sig;\n"
497 "\\&\n"
498 " for (;;) {\n"
499 " s = sigwait(set, &sig);\n"
500 " if (s != 0)\n"
501 " handle_error_en(s, \"sigwait\");\n"
502 " printf(\"Signal handling thread got signal %d\\[rs]n\", sig);\n"
503 " }\n"
504 "}\n"
505 "\\&\n"
506 "int\n"
507 "main(void)\n"
508 "{\n"
509 " pthread_t thread;\n"
510 " sigset_t set;\n"
511 " int s;\n"
512 "\\&\n"
513 " /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
514 " will inherit a copy of the signal mask. */\n"
515 "\\&\n"
516 " sigemptyset(&set);\n"
517 " sigaddset(&set, SIGQUIT);\n"
518 " sigaddset(&set, SIGUSR1);\n"
519 " s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
520 " if (s != 0)\n"
521 " handle_error_en(s, \"pthread_sigmask\");\n"
522 "\\&\n"
523 " s = pthread_create(&thread, NULL, &sig_thread, &set);\n"
524 " if (s != 0)\n"
525 " handle_error_en(s, \"pthread_create\");\n"
526 "\\&\n"
527 " /* Main thread carries on to create other threads and/or do\n"
528 " other work. */\n"
529 "\\&\n"
530 " pause(); /* Dummy pause so we can test program */\n"
531 "}\n"
532 msgstr ""
533 "#include E<lt>errno.hE<gt>\n"
534 "#include E<lt>pthread.hE<gt>\n"
535 "#include E<lt>signal.hE<gt>\n"
536 "#include E<lt>stdio.hE<gt>\n"
537 "#include E<lt>stdlib.hE<gt>\n"
538 "#include E<lt>unistd.hE<gt>\n"
539 "\\&\n"
540 "/* Simple error handling functions */\n"
541 "\\&\n"
542 "#define handle_error_en(en, msg) \\[rs]\n"
543 " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
544 "\\&\n"
545 "static void *\n"
546 "sig_thread(void *arg)\n"
547 "{\n"
548 " sigset_t *set = arg;\n"
549 " int s, sig;\n"
550 "\\&\n"
551 " for (;;) {\n"
552 " s = sigwait(set, &sig);\n"
553 " if (s != 0)\n"
554 " handle_error_en(s, \"sigwait\");\n"
555 " printf(\"Signal handling thread got signal %d\\[rs]n\", sig);\n"
556 " }\n"
557 "}\n"
558 "\\&\n"
559 "int\n"
560 "main(void)\n"
561 "{\n"
562 " pthread_t thread;\n"
563 " sigset_t set;\n"
564 " int s;\n"
565 "\\&\n"
566 " /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
567 " will inherit a copy of the signal mask. */\n"
568 "\\&\n"
569 " sigemptyset(&set);\n"
570 " sigaddset(&set, SIGQUIT);\n"
571 " sigaddset(&set, SIGUSR1);\n"
572 " s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
573 " if (s != 0)\n"
574 " handle_error_en(s, \"pthread_sigmask\");\n"
575 "\\&\n"
576 " s = pthread_create(&thread, NULL, &sig_thread, &set);\n"
577 " if (s != 0)\n"
578 " handle_error_en(s, \"pthread_create\");\n"
579 "\\&\n"
580 " /* Main thread carries on to create other threads and/or do\n"
581 " other work. */\n"
582 "\\&\n"
583 " pause(); /* Dummy pause so we can test program */\n"
584 "}\n"
585
586 #. type: TH
587 #: fedora-44 fedora-rawhide
588 #, no-wrap
589 msgid "2024-07-23"
590 msgstr "23 يوليو 2024"
591
592 #. type: TH
593 #: fedora-44 fedora-rawhide
594 #, no-wrap
595 msgid "Linux man-pages 6.13"
596 msgstr "صفحات دليل لينكس 6.13"
597
598 #. type: TH
599 #: mageia-cauldron
600 #, no-wrap
601 msgid "Linux man-pages 6.17"
602 msgstr "صفحات دليل لينكس 6.17"
603
604 #. type: TH
605 #: opensuse-leap-16-1 opensuse-tumbleweed
606 #, no-wrap
607 msgid "Linux man-pages (unreleased)"
608 msgstr "صفحات دليل لينكس (لم تصدر بعد)"