Debian Codegraph @

po/ro/man3/pthread_sigmask.3.po

raw
1 # Romanian translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Remus-Gabriel Chelu <[email protected]>, 2024, 2025.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.21.0\n"
8 "POT-Creation-Date: 2026-06-05 06:38+0200\n"
9 "PO-Revision-Date: 2025-11-05 20:42+0100\n"
10 "Last-Translator: Remus-Gabriel Chelu <[email protected]>\n"
11 "Language-Team: Romanian <[email protected]>\n"
12 "Language: ro\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=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
17 "20)) ? 1 : 2;\n"
18 "X-Generator: Poedit 3.6\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 septembrie 2025"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "Pagini de manual de Linux 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 "NUME"
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 - examinează și schimbă masca semnalelor blocate"
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 "BIBLIOTECA"
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 "Biblioteca de fire de execuție 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 "SINOPSIS"
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 "Cerințe pentru macrocomenzi de testare a caracteristicilor pentru glibc "
94 "(consultați B<feature_test_macros>(7)):"
95
96 #. type: Plain text
97 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
98 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
99 msgid "B<pthread_sigmask>():"
100 msgstr "B<pthread_sigmask>():"
101
102 #. type: Plain text
103 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
104 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
105 #, no-wrap
106 msgid " _POSIX_C_SOURCE E<gt>= 199506L || _XOPEN_SOURCE E<gt>= 500\n"
107 msgstr " _POSIX_C_SOURCE E<gt>= 199506L || _XOPEN_SOURCE E<gt>= 500\n"
108
109 #. type: SH
110 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
111 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
112 #, no-wrap
113 msgid "DESCRIPTION"
114 msgstr "DESCRIERE"
115
116 #. type: Plain text
117 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
118 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
119 msgid ""
120 "The B<pthread_sigmask>() function is just like B<sigprocmask>(2), with the "
121 "difference that its use in multithreaded programs is explicitly specified by "
122 "POSIX.1. Other differences are noted in this page."
123 msgstr ""
124 "Funcția B<pthread_sigmask>() este la fel ca B<sigprocmask>(2), cu diferența "
125 "că utilizarea sa în programele cu mai multe fire este specificată în mod "
126 "explicit de POSIX.1. Alte diferențe sunt notate în această pagină."
127
128 #. type: Plain text
129 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
130 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
131 msgid ""
132 "For a description of the arguments and operation of this function, see "
133 "B<sigprocmask>(2)."
134 msgstr ""
135 "Pentru o descriere a argumentelor și a modului de funcționare a acestei "
136 "funcții, a se vedea B<sigprocmask>(2)."
137
138 #. type: SH
139 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
140 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
141 #, no-wrap
142 msgid "RETURN VALUE"
143 msgstr "VALOAREA RETURNATĂ"
144
145 #. type: Plain text
146 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
147 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
148 msgid ""
149 "On success, B<pthread_sigmask>() returns 0; on error, it returns an error "
150 "number."
151 msgstr ""
152 "În caz de succes, B<pthread_sigmask>() returnează 0; în caz de eroare, "
153 "returnează un număr de eroare."
154
155 #. type: SH
156 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
157 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
158 #, no-wrap
159 msgid "ERRORS"
160 msgstr "ERORI-IEȘIRE"
161
162 #. type: Plain text
163 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
164 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
165 msgid "See B<sigprocmask>(2)."
166 msgstr "A se vedea B<sigprocmask>(2)."
167
168 #. type: SH
169 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
170 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
171 #, no-wrap
172 msgid "ATTRIBUTES"
173 msgstr "ATRIBUTE"
174
175 #. type: Plain text
176 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
177 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
178 msgid ""
179 "For an explanation of the terms used in this section, see B<attributes>(7)."
180 msgstr ""
181 "Pentru o explicație a termenilor folosiți în această secțiune, a se vedea "
182 "B<attributes>(7)."
183
184 #. type: tbl table
185 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
186 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
187 #, no-wrap
188 msgid "Interface"
189 msgstr "Interfață"
190
191 #. type: tbl table
192 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
193 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
194 #, no-wrap
195 msgid "Attribute"
196 msgstr "Atribut"
197
198 #. type: tbl table
199 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
200 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
201 #, no-wrap
202 msgid "Value"
203 msgstr "Valoare"
204
205 #. type: tbl table
206 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
207 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
208 #, no-wrap
209 msgid ".na\n"
210 msgstr ".na\n"
211
212 #. type: tbl table
213 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
214 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
215 #, no-wrap
216 msgid ".nh\n"
217 msgstr ".nh\n"
218
219 #. type: tbl table
220 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
221 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
222 #, no-wrap
223 msgid "B<pthread_sigmask>()"
224 msgstr "B<pthread_sigmask>()"
225
226 #. type: tbl table
227 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
228 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
229 #, no-wrap
230 msgid "Thread safety"
231 msgstr "Siguranța firelor"
232
233 #. type: tbl table
234 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
235 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
236 #, no-wrap
237 msgid "MT-Safe"
238 msgstr "MT-Safe"
239
240 #. type: SH
241 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
242 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
243 #, no-wrap
244 msgid "STANDARDS"
245 msgstr "STANDARDE"
246
247 #. type: Plain text
248 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
249 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
250 msgid "POSIX.1-2008."
251 msgstr "POSIX.1-2008."
252
253 #. type: SH
254 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
255 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
256 #, no-wrap
257 msgid "HISTORY"
258 msgstr "ISTORIC"
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 "POSIX.1-2001."
264 msgstr "POSIX.1-2001."
265
266 #. type: SH
267 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
268 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
269 #, no-wrap
270 msgid "NOTES"
271 msgstr "NOTE"
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 "A new thread inherits a copy of its creator's signal mask."
277 msgstr "Un nou fir moștenește o copie a măștii de semnal a creatorului său."
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 "The glibc B<pthread_sigmask>() function silently ignores attempts to block "
284 "the two real-time signals that are used internally by the NPTL threading "
285 "implementation. See B<nptl>(7) for details."
286 msgstr ""
287 "Funcția glibc B<pthread_sigmask>() ignoră în tăcere încercările de a bloca "
288 "cele două semnale în timp real care sunt utilizate în mod intern de către "
289 "implementarea firelor NPTL. A se vedea B<nptl>(7) pentru detalii."
290
291 #. type: SH
292 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
293 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
294 #, no-wrap
295 msgid "EXAMPLES"
296 msgstr "EXEMPLE"
297
298 #. type: Plain text
299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
301 msgid ""
302 "The program below blocks some signals in the main thread, and then creates a "
303 "dedicated thread to fetch those signals via B<sigwait>(3). The following "
304 "shell session demonstrates its use:"
305 msgstr ""
306 "Programul de mai jos blochează unele semnale în firul principal și apoi "
307 "creează un fir dedicat pentru a prelua aceste semnale prin B<sigwait>(3). "
308 "Următoarea sesiune shell demonstrează utilizarea sa:"
309
310 #. type: Plain text
311 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
312 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
313 #, no-wrap
314 msgid ""
315 "$B< ./a.out &>\n"
316 "[1] 5423\n"
317 "$B< kill -QUIT %1>\n"
318 "Signal handling thread got signal 3\n"
319 "$B< kill -USR1 %1>\n"
320 "Signal handling thread got signal 10\n"
321 "$B< kill -TERM %1>\n"
322 "[1]+ Terminated ./a.out\n"
323 msgstr ""
324 "$B< ./a.out &>\n"
325 "[1] 5423\n"
326 "$B< kill -QUIT %1>\n"
327 "Firul de gestionare a semnalelor a primit semnalul 3\n"
328 "$B< kill -USR1 %1>\n"
329 "Firul de gestionare a semnalelor a primit semnalul 10\n"
330 "$B< kill -TERM %1>\n"
331 "[1]+ Terminat ./a.out\n"
332
333 #. type: SS
334 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
335 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
336 #, no-wrap
337 msgid "Program source"
338 msgstr "Sursa programului"
339
340 #. type: Plain text
341 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
342 #: opensuse-tumbleweed
343 #, no-wrap
344 msgid ""
345 "#include E<lt>err.hE<gt>\n"
346 "#include E<lt>errno.hE<gt>\n"
347 "#include E<lt>pthread.hE<gt>\n"
348 "#include E<lt>signal.hE<gt>\n"
349 "#include E<lt>stdio.hE<gt>\n"
350 "#include E<lt>stdlib.hE<gt>\n"
351 "#include E<lt>unistd.hE<gt>\n"
352 "\\&\n"
353 "/* Simple error handling functions */\n"
354 "\\&\n"
355 "static void *\n"
356 "sig_thread(void *arg)\n"
357 "{\n"
358 " sigset_t *set = arg;\n"
359 " int s, sig;\n"
360 "\\&\n"
361 " for (;;) {\n"
362 " s = sigwait(set, &sig);\n"
363 " if (s != 0)\n"
364 " errc(EXIT_FAILURE, s, \"sigwait\");\n"
365 " printf(\"Signal handling thread got signal %d\\[rs]n\", sig);\n"
366 " }\n"
367 "}\n"
368 "\\&\n"
369 "int\n"
370 "main(void)\n"
371 "{\n"
372 " pthread_t thread;\n"
373 " sigset_t set;\n"
374 " int s;\n"
375 "\\&\n"
376 " /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
377 " will inherit a copy of the signal mask. */\n"
378 "\\&\n"
379 " sigemptyset(&set);\n"
380 " sigaddset(&set, SIGQUIT);\n"
381 " sigaddset(&set, SIGUSR1);\n"
382 " s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
383 " if (s != 0)\n"
384 " errc(EXIT_FAILURE, s, \"pthread_sigmask\");\n"
385 "\\&\n"
386 " s = pthread_create(&thread, NULL, &sig_thread, &set);\n"
387 " if (s != 0)\n"
388 " errc(EXIT_FAILURE, s, \"pthread_create\");\n"
389 "\\&\n"
390 " /* Main thread carries on to create other threads and/or do\n"
391 " other work. */\n"
392 "\\&\n"
393 " pause(); /* Dummy pause so we can test program */\n"
394 "}\n"
395 msgstr ""
396 "#include E<lt>err.hE<gt>\n"
397 "#include E<lt>errno.hE<gt>\n"
398 "#include E<lt>pthread.hE<gt>\n"
399 "#include E<lt>signal.hE<gt>\n"
400 "#include E<lt>stdio.hE<gt>\n"
401 "#include E<lt>stdlib.hE<gt>\n"
402 "#include E<lt>unistd.hE<gt>\n"
403 "\\&\n"
404 "/* Funcții simple de gestionare a erorilor */\n"
405 "\\&\n"
406 "static void *\n"
407 "sig_thread(void *arg)\n"
408 "{\n"
409 " sigset_t *set = arg;\n"
410 " int s, sig;\n"
411 "\\&\n"
412 " for (;;) {\n"
413 " s = sigwait(set, &sig);\n"
414 " if (s != 0)\n"
415 " errc(EXIT_FAILURE, s, \"sigwait\");\n"
416 " printf(\"Firul de gestionare a semnalelor a primit semnalul %d\\[rs]n\", sig);\n"
417 " }\n"
418 "}\n"
419 "\\&\n"
420 "int\n"
421 "main(void)\n"
422 "{\n"
423 " pthread_t thread;\n"
424 " sigset_t set;\n"
425 " int s;\n"
426 "\\&\n"
427 " /* Blochează SIGQUIT și SIGUSR1; alte fire create de main()\n"
428 " vor moșteni o copie a măștii de semnal. */\n"
429 "\\&\n"
430 " sigemptyset(&set);\n"
431 " sigaddset(&set, SIGQUIT);\n"
432 " sigaddset(&set, SIGUSR1);\n"
433 " s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
434 " if (s != 0)\n"
435 " errc(EXIT_FAILURE, s, \"pthread_sigmask\");\n"
436 "\\&\n"
437 " s = pthread_create(&thread, NULL, &sig_thread, &set);\n"
438 " if (s != 0)\n"
439 " errc(EXIT_FAILURE, s, \"pthread_create\");\n"
440 "\\&\n"
441 " /* Firul principal continuă să creeze alte fire și/sau să facă\n"
442 " alte lucrări. */\n"
443 "\\&\n"
444 " pause(); /* Pauză fictivă pentru a putea testa programul */\n"
445 "}\n"
446
447 #. SRC END
448 #. type: SH
449 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
450 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
451 #, no-wrap
452 msgid "SEE ALSO"
453 msgstr "CONSULTAȚI ȘI"
454
455 #. type: Plain text
456 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
457 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
458 msgid ""
459 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), "
460 "B<pthread_attr_setsigmask_np>(3), B<pthread_create>(3), B<pthread_kill>(3), "
461 "B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
462 msgstr ""
463 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), "
464 "B<pthread_attr_setsigmask_np>(3), B<pthread_create>(3), B<pthread_kill>(3), "
465 "B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
466
467 #. type: TH
468 #: debian-trixie
469 #, no-wrap
470 msgid "2024-06-15"
471 msgstr "15 iunie 2024"
472
473 #. type: TH
474 #: debian-trixie
475 #, no-wrap
476 msgid "Linux man-pages 6.9.1"
477 msgstr "Pagini de manual de Linux 6.9.1"
478
479 #. type: Plain text
480 #: debian-trixie
481 msgid "POSIX threads library (I<libpthread>, I<-lpthread>)"
482 msgstr "Biblioteca de fire de execuție POSIX (I<libpthread>, I<-lpthread>)"
483
484 #. type: Plain text
485 #: debian-trixie fedora-44 fedora-rawhide
486 #, no-wrap
487 msgid ""
488 "#include E<lt>errno.hE<gt>\n"
489 "#include E<lt>pthread.hE<gt>\n"
490 "#include E<lt>signal.hE<gt>\n"
491 "#include E<lt>stdio.hE<gt>\n"
492 "#include E<lt>stdlib.hE<gt>\n"
493 "#include E<lt>unistd.hE<gt>\n"
494 "\\&\n"
495 "/* Simple error handling functions */\n"
496 "\\&\n"
497 "#define handle_error_en(en, msg) \\[rs]\n"
498 " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
499 "\\&\n"
500 "static void *\n"
501 "sig_thread(void *arg)\n"
502 "{\n"
503 " sigset_t *set = arg;\n"
504 " int s, sig;\n"
505 "\\&\n"
506 " for (;;) {\n"
507 " s = sigwait(set, &sig);\n"
508 " if (s != 0)\n"
509 " handle_error_en(s, \"sigwait\");\n"
510 " printf(\"Signal handling thread got signal %d\\[rs]n\", sig);\n"
511 " }\n"
512 "}\n"
513 "\\&\n"
514 "int\n"
515 "main(void)\n"
516 "{\n"
517 " pthread_t thread;\n"
518 " sigset_t set;\n"
519 " int s;\n"
520 "\\&\n"
521 " /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
522 " will inherit a copy of the signal mask. */\n"
523 "\\&\n"
524 " sigemptyset(&set);\n"
525 " sigaddset(&set, SIGQUIT);\n"
526 " sigaddset(&set, SIGUSR1);\n"
527 " s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
528 " if (s != 0)\n"
529 " handle_error_en(s, \"pthread_sigmask\");\n"
530 "\\&\n"
531 " s = pthread_create(&thread, NULL, &sig_thread, &set);\n"
532 " if (s != 0)\n"
533 " handle_error_en(s, \"pthread_create\");\n"
534 "\\&\n"
535 " /* Main thread carries on to create other threads and/or do\n"
536 " other work. */\n"
537 "\\&\n"
538 " pause(); /* Dummy pause so we can test program */\n"
539 "}\n"
540 msgstr ""
541 "#include E<lt>errno.hE<gt>\n"
542 "#include E<lt>pthread.hE<gt>\n"
543 "#include E<lt>signal.hE<gt>\n"
544 "#include E<lt>stdio.hE<gt>\n"
545 "#include E<lt>stdlib.hE<gt>\n"
546 "#include E<lt>unistd.hE<gt>\n"
547 "\\&\n"
548 "/* Funcții simple de gestionare a erorilor */\n"
549 "\\&\n"
550 "#define handle_error_en(en, msg) \\[rs]\n"
551 " do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
552 "\\&\n"
553 "static void *\n"
554 "sig_thread(void *arg)\n"
555 "{\n"
556 " sigset_t *set = arg;\n"
557 " int s, sig;\n"
558 "\\&\n"
559 " for (;;) {\n"
560 " s = sigwait(set, &sig);\n"
561 " if (s != 0)\n"
562 " handle_error_en(s, \"sigwait\");\n"
563 " printf(\"Firul de gestionare a semnalelor a primit semnalul %d\\[rs]n\", sig);\n"
564 " }\n"
565 "}\n"
566 "\\&\n"
567 "int\n"
568 "main(void)\n"
569 "{\n"
570 " pthread_t thread;\n"
571 " sigset_t set;\n"
572 " int s;\n"
573 "\\&\n"
574 " /* Blochează SIGQUIT și SIGUSR1; alte fire create de main()\n"
575 " vor moșteni o copie a măștii de semnal. */\n"
576 "\\&\n"
577 " sigemptyset(&set);\n"
578 " sigaddset(&set, SIGQUIT);\n"
579 " sigaddset(&set, SIGUSR1);\n"
580 " s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
581 " if (s != 0)\n"
582 " handle_error_en(s, \"pthread_sigmask\");\n"
583 "\\&\n"
584 " s = pthread_create(&thread, NULL, &sig_thread, &set);\n"
585 " if (s != 0)\n"
586 " handle_error_en(s, \"pthread_create\");\n"
587 "\\&\n"
588 " /* Firul principal continuă să creeze alte fire și/sau să facă\n"
589 " alte lucrări. */\n"
590 "\\&\n"
591 " pause(); /* Pauză fictivă pentru a putea testa programul */\n"
592 "}\n"
593
594 #. type: TH
595 #: fedora-44 fedora-rawhide
596 #, no-wrap
597 msgid "2024-07-23"
598 msgstr "23 iulie 2024"
599
600 #. type: TH
601 #: fedora-44 fedora-rawhide
602 #, no-wrap
603 msgid "Linux man-pages 6.13"
604 msgstr "Pagini de manual de Linux 6.13"
605
606 #. type: TH
607 #: mageia-cauldron
608 #, no-wrap
609 msgid "Linux man-pages 6.17"
610 msgstr "Pagini de manual de Linux 6.17"
611
612 #. type: TH
613 #: opensuse-leap-16-1 opensuse-tumbleweed
614 #, no-wrap
615 msgid "Linux man-pages (unreleased)"
616 msgstr "Pagini de manual Linux (nepublicate)"