1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
|
# Russian translation of manpages
# This file is distributed under the same license as the manpages-l10n package.
# Copyright © of this file:
# Azamat Hackimov <azamat.hackimov@gmail.com>, 2016.
# Yuri Kozlov <yuray@komyakino.ru>, 2011-2015, 2017-2019.
msgid ""
msgstr ""
"Project-Id-Version: manpages-l10n\n"
"POT-Creation-Date: 2024-06-01 06:34+0200\n"
"PO-Revision-Date: 2019-10-15 19:01+0300\n"
"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
"Language-Team: Russian <man-pages-ru-talks@lists.sourceforge.net>\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"
"%100>=11 && n%100<=14)? 2 : 3);\n"
"X-Generator: Lokalize 2.0\n"
#. type: TH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "wait"
msgstr "wait"
#. type: TH
#: archlinux debian-unstable opensuse-tumbleweed
#, no-wrap
msgid "2024-05-02"
msgstr "2 мая 2024 г."
#. type: TH
#: archlinux debian-unstable
#, fuzzy, no-wrap
#| msgid "Linux man-pages 6.7"
msgid "Linux man-pages 6.8"
msgstr "Linux man-pages 6.7"
#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "NAME"
msgstr "ИМЯ"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "wait, waitpid, waitid - wait for process to change state"
msgstr "wait, waitpid, waitid - ожидает смену состояния процесса"
#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "LIBRARY"
msgstr ""
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "Standard C library (I<libc>, I<-lc>)"
msgstr ""
#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "SYNOPSIS"
msgstr "СИНТАКСИС"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<#include E<lt>sys/wait.hE<gt>>\n"
msgstr "B<#include E<lt>sys/wait.hE<gt>>\n"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, fuzzy, no-wrap
#| msgid ""
#| "B<pid_t wait(int *>I<wstatus>B<);>\n"
#| "B<pid_t waitpid(pid_t >I<pid>B<, int *>I<wstatus>B<, int >I<options>B<);>\n"
msgid ""
"B<pid_t wait(int *_Nullable >I<wstatus>B<);>\n"
"B<pid_t waitpid(pid_t >I<pid>B<, int *_Nullable >I<wstatus>B<, int >I<options>B<);>\n"
msgstr ""
"B<pid_t wait(int *>I<wstatus>B<);>\n"
"B<pid_t waitpid(pid_t >I<pid>B<, int *>I<wstatus>B<, int >I<options>B<);>\n"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid ""
"B<int waitid(idtype_t >I<idtype>B<, id_t >I<id>B<, siginfo_t *>I<infop>B<, int >I<options>B<);>\n"
" /* This is the glibc and POSIX interface; see\n"
" NOTES for information on the raw system call. */\n"
msgstr ""
"B<int waitid(idtype_t >I<idtype>B<, id_t >I<id>B<, siginfo_t *>I<infop>B<, int >I<options>B<);>\n"
" /* Это интерфейс glibc и POSIX; информацию по\n"
" системному вызову ядра смотрите в ЗАМЕЧАНИЯ. */\n"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
msgstr ""
"Требования макроса тестирования свойств для glibc (см. "
"B<feature_test_macros>(7)):"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "B<waitid>():"
msgstr "B<waitid>():"
#. (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED)
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, fuzzy, no-wrap
#| msgid ""
#| "Glibc 2.25 and earlier:\n"
#| " _XOPEN_SOURCE\n"
#| " || /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L\n"
#| " || /* Glibc versions E<lt>= 2.19: */ _BSD_SOURCE\n"
msgid ""
" Since glibc 2.26:\n"
" _XOPEN_SOURCE E<gt>= 500 || _POSIX_C_SOURCE E<gt>= 200809L\n"
" glibc 2.25 and earlier:\n"
" _XOPEN_SOURCE\n"
" || /* Since glibc 2.12: */ _POSIX_C_SOURCE E<gt>= 200809L\n"
" || /* glibc E<lt>= 2.19: */ _BSD_SOURCE\n"
msgstr ""
"в glibc 2.25 и старее:\n"
" _XOPEN_SOURCE\n"
" || /* начиная с glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L\n"
" || /* в версиях glibc E<lt>= 2.19: */ _BSD_SOURCE\n"
#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "DESCRIPTION"
msgstr "ОПИСАНИЕ"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"All of these system calls are used to wait for state changes in a child of "
"the calling process, and obtain information about the child whose state has "
"changed. A state change is considered to be: the child terminated; the "
"child was stopped by a signal; or the child was resumed by a signal. In the "
"case of a terminated child, performing a wait allows the system to release "
"the resources associated with the child; if a wait is not performed, then "
"the terminated child remains in a \"zombie\" state (see NOTES below)."
msgstr ""
"Данные системные вызовы используются для ожидания изменения состояния "
"процесса-потомка вызвавшего процесса и получения информации о потомке, чьё "
"состояние изменилось. Сменой состояния считается: прекращение работы "
"потомка, останов потомка по сигналу, продолжение работы потомка по сигналу. "
"Ожидание прекращения работы потомка позволяет системе освободить ресурсы, "
"использовавшиеся потомком; если ожидание не выполняется, то прекративший "
"работу потомок остаётся в системе в состоянии \"зомби (zombie)\" (см. "
"ЗАМЕЧАНИЯ далее)."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If a child has already changed state, then these calls return immediately. "
"Otherwise, they block until either a child changes state or a signal handler "
"interrupts the call (assuming that system calls are not automatically "
"restarted using the B<SA_RESTART> flag of B<sigaction>(2)). In the "
"remainder of this page, a child whose state has changed and which has not "
"yet been waited upon by one of these system calls is termed I<waitable>."
msgstr ""
"Если состояние потомка уже изменилось, то вызов сразу возвращает результат. "
"В противном случае, работа приостанавливается до тех пор, пока не произойдёт "
"изменение состояния потомка или обработчик сигналов не прервёт вызов "
"(предполагается, что системные вызовы не перезапускаются автоматически из-за "
"указания флага B<SA_RESTART> в B<sigaction>(2)). В оставшейся части страницы "
"потомок, чьё состояние ещё не было получено одним из этих системных вызовов, "
"называется I<ожидаемым (waitable)>."
#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "wait() and waitpid()"
msgstr "wait() и waitpid()"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The B<wait>() system call suspends execution of the calling thread until "
"one of its children terminates. The call I<wait(&wstatus)> is equivalent to:"
msgstr ""
"Системный вызов B<wait>() приостанавливает выполнение вызвавшей нити до тех "
"пор, пока не прекратит выполнение один из её потомков. Вызов "
"I<wait(&wstatus)> эквивалентен:"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "waitpid(-1, &wstatus, 0);\n"
msgstr "waitpid(-1, &wstatus, 0);\n"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The B<waitpid>() system call suspends execution of the calling thread until "
"a child specified by I<pid> argument has changed state. By default, "
"B<waitpid>() waits only for terminated children, but this behavior is "
"modifiable via the I<options> argument, as described below."
msgstr ""
"Системный вызов B<waitpid>() приостанавливает выполнение вызвавшей нити до "
"тех пор, пока не изменится состояние потомка, заданного аргументом I<pid>. "
"По умолчанию B<waitpid>() ожидает только прекращения работы потомка, но это "
"можно изменить через аргумент I<options> как описано далее."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "The value of I<pid> can be:"
msgstr "Значением I<pid> может быть:"
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, fuzzy, no-wrap
#| msgid "E<lt> -1"
msgid "E<lt> B<-1>"
msgstr "E<lt> -1"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"meaning wait for any child process whose process group ID is equal to the "
"absolute value of I<pid>."
msgstr ""
"означает, что нужно ждать любого потомка, чей идентификатор группы процессов "
"равен абсолютному значению I<pid>."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<-1>"
msgstr "B<-1>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "meaning wait for any child process."
msgstr "означает, что нужно ждать любого потомка."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<0>"
msgstr "B<0>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, fuzzy
#| msgid ""
#| "meaning wait for any child process whose process group ID is equal to "
#| "that of the calling process."
msgid ""
"meaning wait for any child process whose process group ID is equal to that "
"of the calling process at the time of the call to B<waitpid>()."
msgstr ""
"означает, что нужно ждать любого потомка, чей идентификатор группы процессов "
"равен таковому у вызвавшего процесса."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, fuzzy, no-wrap
#| msgid "E<gt> 0"
msgid "E<gt> B<0>"
msgstr "E<gt> 0"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"meaning wait for the child whose process ID is equal to the value of I<pid>."
msgstr ""
"означает, что нужно ждать любого потомка, чей идентификатор процесса равен "
"I<pid>."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The value of I<options> is an OR of zero or more of the following constants:"
msgstr ""
"Значение I<options> создаётся путем битовой операции ИЛИ над следующими "
"константами:"
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<WNOHANG>"
msgstr "B<WNOHANG>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "return immediately if no child has exited."
msgstr ""
"означает немедленный возврат, если ни один потомок не завершил выполнение."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<WUNTRACED>"
msgstr "B<WUNTRACED>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"also return if a child has stopped (but not traced via B<ptrace>(2)). "
"Status for I<traced> children which have stopped is provided even if this "
"option is not specified."
msgstr ""
"также возвращаться, если есть остановленный потомок (но не трассируемый "
"через B<ptrace>(2)). Состояние I<трассируемого> остановленного потомка "
"предоставляется даже если этот аргумент не указан."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<WCONTINUED> (since Linux 2.6.10)"
msgstr "B<WCONTINUED> (начиная с Linux 2.6.10)"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"also return if a stopped child has been resumed by delivery of B<SIGCONT>."
msgstr ""
"также возвращаться, если работа остановленного потомка возобновилась из-за "
"получения сигнала B<SIGCONT>."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "(For Linux-only options, see below.)"
msgstr "(Аргументы, имеющиеся только в Linux, см. далее.)"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If I<wstatus> is not NULL, B<wait>() and B<waitpid>() store status "
"information in the I<int> to which it points. This integer can be inspected "
"with the following macros (which take the integer itself as an argument, not "
"a pointer to it, as is done in B<wait>() and B<waitpid>()!):"
msgstr ""
"Если I<wstatus> не равен NULL, то B<wait>() и B<waitpid>() сохраняют "
"информацию о состоянии в переменной типа I<int>, на которую указывает "
"I<wstatus>. Это целое число можно исследовать с помощью следующих макросов "
"(они принимают в качестве аргумента само целое, а не указатель на него как "
"B<wait>() и B<waitpid>()!):"
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<WIFEXITED(>I<wstatus>B<)>"
msgstr "B<WIFEXITED(>I<wstatus>B<)>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"returns true if the child terminated normally, that is, by calling "
"B<exit>(3) or B<_exit>(2), or by returning from main()."
msgstr ""
"возвращает истинное значение, если потомок нормально завершился, то есть "
"вызвал B<exit>(3) или B<_exit>(2), или вернулся из функции main()."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<WEXITSTATUS(>I<wstatus>B<)>"
msgstr "B<WEXITSTATUS(>I<wstatus>B<)>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"returns the exit status of the child. This consists of the least "
"significant 8 bits of the I<status> argument that the child specified in a "
"call to B<exit>(3) or B<_exit>(2) or as the argument for a return "
"statement in main(). This macro should be employed only if B<WIFEXITED> "
"returned true."
msgstr ""
"возвращает код завершения потомка. Он состоит из восьми младших бит "
"аргумента I<status>, который потомок указал при вызове B<exit>(3) или "
"B<_exit>(2) или в аргументе оператора return в функции main(). Этот макрос "
"можно использовать, только если B<WIFEXITED> вернул истинное значение."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<WIFSIGNALED(>I<wstatus>B<)>"
msgstr "B<WIFSIGNALED(>I<wstatus>B<)>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "returns true if the child process was terminated by a signal."
msgstr "возвращает истинное значение, если потомок завершился из-за сигнала."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<WTERMSIG(>I<wstatus>B<)>"
msgstr "B<WTERMSIG(>I<wstatus>B<)>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"returns the number of the signal that caused the child process to "
"terminate. This macro should be employed only if B<WIFSIGNALED> returned "
"true."
msgstr ""
"возвращает номер сигнала, который привел к завершению потомка. Этот макрос "
"можно использовать, только если B<WIFSIGNALED> вернул истинное значение."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<WCOREDUMP(>I<wstatus>B<)>"
msgstr "B<WCOREDUMP(>I<wstatus>B<)>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"returns true if the child produced a core dump (see B<core>(5)). This macro "
"should be employed only if B<WIFSIGNALED> returned true."
msgstr ""
"возвращает истину, если потомок создал дамп памяти (смотрите B<core>(5)). "
"Этот макрос можно использовать только, если при B<WIFSIGNALED> возвращается "
"истинное значение."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"This macro is not specified in POSIX.1-2001 and is not available on some "
"UNIX implementations (e.g., AIX, SunOS). Therefore, enclose its use inside "
"I<#ifdef WCOREDUMP ... #endif>."
msgstr ""
"Данный макрос не описан в POSIX.1-2001 и недоступен в некоторых реализациях "
"UNIX (например, AIX, SunOS). Поэтому указывайте его внутри I<#ifdef "
"WCOREDUMP ... #endif>."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<WIFSTOPPED(>I<wstatus>B<)>"
msgstr "B<WIFSTOPPED(>I<wstatus>B<)>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"returns true if the child process was stopped by delivery of a signal; this "
"is possible only if the call was done using B<WUNTRACED> or when the child "
"is being traced (see B<ptrace>(2))."
msgstr ""
"возвращает истинное значение, если потомок остановлен по сигналу; это "
"возможно только, если при вызове был указан флаг B<WUNTRACED> или если над "
"потомком выполняется трассировка (см. B<ptrace>(2))."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<WSTOPSIG(>I<wstatus>B<)>"
msgstr "B<WSTOPSIG(>I<wstatus>B<)>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"returns the number of the signal which caused the child to stop. This macro "
"should be employed only if B<WIFSTOPPED> returned true."
msgstr ""
"возвращает номер сигнала, из-за которого потомок был остановлен. Этот макрос "
"можно использовать только, если при B<WIFSTOPPED> возвращается истинное "
"значение."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<WIFCONTINUED(>I<wstatus>B<)>"
msgstr "B<WIFCONTINUED(>I<wstatus>B<)>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"(since Linux 2.6.10) returns true if the child process was resumed by "
"delivery of B<SIGCONT>."
msgstr ""
"(начиная с Linux 2.6.10) возвращает истинное значение, если потомок "
"продолжил работу, получив сигнал B<SIGCONT>."
#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "waitid()"
msgstr "waitid()"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The B<waitid>() system call (available since Linux 2.6.9) provides more "
"precise control over which child state changes to wait for."
msgstr ""
"Системный вызов B<waitid>() (доступен, начиная с Linux 2.6.9) предоставляет "
"более полный контроль над тем, какого изменения состояния нужно ждать у "
"потомка."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The I<idtype> and I<id> arguments select the child(ren) to wait for, as "
"follows:"
msgstr "Аргументы I<idtype> и I<id> определяют какого(их) потомков ждать:"
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "I<idtype> == B<P_PID>"
msgstr "I<idtype> == B<P_PID>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "Wait for the child whose process ID matches I<id>."
msgstr "Ждать потомка, чей ID процесса совпадает с I<id>."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "I<idtype> == B<P_PIDFD> (since Linux 5.4)"
msgstr "I<idtype> == B<P_PIDFD> (начиная с Linux 5.4)"
#. commit 3695eae5fee0605f316fbaad0b9e3de791d7dfaf
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Wait for the child referred to by the PID file descriptor specified in "
"I<id>. (See B<pidfd_open>(2) for further information on PID file "
"descriptors.)"
msgstr ""
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "I<idtype> == B<P_PGID>"
msgstr "I<idtype> == B<P_PGID>"
#. commit 821cc7b0b205c0df64cce59aacc330af251fa8f7
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Wait for any child whose process group ID matches I<id>. Since Linux 5.4, "
"if I<id> is zero, then wait for any child that is in the same process group "
"as the caller's process group at the time of the call."
msgstr ""
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "I<idtype> == B<P_ALL>"
msgstr "I<idtype> == B<P_ALL>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "Wait for any child; I<id> is ignored."
msgstr "Ждать любого потомка; значение I<id> игнорируется."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The child state changes to wait for are specified by ORing one or more of "
"the following flags in I<options>:"
msgstr ""
"Ожидаемые изменения состояния потомков задаются следующими флагами в "
"I<options> (объединяются через OR):"
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<WEXITED>"
msgstr "B<WEXITED>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "Wait for children that have terminated."
msgstr "Ждать завершения потомков."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<WSTOPPED>"
msgstr "B<WSTOPPED>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "Wait for children that have been stopped by delivery of a signal."
msgstr "Ждать потомков, которые завершатся по получению сигнала."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<WCONTINUED>"
msgstr "B<WCONTINUED>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Wait for (previously stopped) children that have been resumed by delivery of "
"B<SIGCONT>."
msgstr ""
"Ждать возобновления работы потомков (ранее остановленных) при получении "
"сигнала B<SIGCONT>."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "The following flags may additionally be ORed in I<options>:"
msgstr ""
"Дополнительно с помощью OR в I<options> могут задаваться следующие флаги:"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "As for B<waitpid>()."
msgstr "Как в B<waitpid>()."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<WNOWAIT>"
msgstr "B<WNOWAIT>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Leave the child in a waitable state; a later wait call can be used to again "
"retrieve the child status information."
msgstr ""
"Оставить потомка в состоянии ожидания; последующий вызов wait сможет снова "
"получить информацию о состоянии потомка."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Upon successful return, B<waitid>() fills in the following fields of the "
"I<siginfo_t> structure pointed to by I<infop>:"
msgstr ""
"При успешном возврате, B<waitid>() заполняет следующие поля в структуре "
"I<siginfo_t>, указываемой из I<infop>:"
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "I<si_pid>"
msgstr "I<si_pid>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "The process ID of the child."
msgstr "ID процесса потомка."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "I<si_uid>"
msgstr "I<si_uid>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The real user ID of the child. (This field is not set on most other "
"implementations.)"
msgstr ""
"Реальный пользовательский ID потомка. (Это поле не заполняется в большинстве "
"других реализаций.)"
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "I<si_signo>"
msgstr "I<si_signo>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "Always set to B<SIGCHLD>."
msgstr "Всегда устанавливается в B<SIGCHLD>."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "I<si_status>"
msgstr "I<si_status>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Either the exit status of the child, as given to B<_exit>(2) (or "
"B<exit>(3)), or the signal that caused the child to terminate, stop, or "
"continue. The I<si_code> field can be used to determine how to interpret "
"this field."
msgstr ""
"Заполняется кодом завершения потомка, заданном в B<_exit>(2) (или в "
"B<exit>(3)), или номером сигнала, который прервал, остановил или продолжил "
"работу потомка. Что записано в данном поле можно определить по значению поля "
"I<si_code>."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "I<si_code>"
msgstr "I<si_code>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Set to one of: B<CLD_EXITED> (child called B<_exit>(2)); B<CLD_KILLED> "
"(child killed by signal); B<CLD_DUMPED> (child killed by signal, and dumped "
"core); B<CLD_STOPPED> (child stopped by signal); B<CLD_TRAPPED> (traced "
"child has trapped); or B<CLD_CONTINUED> (child continued by B<SIGCONT>)."
msgstr ""
"Устанавливается в одно из: B<CLD_EXITED> (потомок вызвал B<_exit>(2)); "
"B<CLD_KILLED> (потомок завершил работу по сигналу); B<CLD_DUMPED> (потомок "
"завершил работу по сигналу и был создан дамп памяти); B<CLD_STOPPED> "
"(потомок приостановлен по сигналу); B<CLD_TRAPPED> (трассируемый потомок был "
"захвачен); или B<CLD_CONTINUED> (потомок продолжил работу по сигналу "
"B<SIGCONT>)."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"If B<WNOHANG> was specified in I<options> and there were no children in a "
"waitable state, then B<waitid>() returns 0 immediately and the state of the "
"I<siginfo_t> structure pointed to by I<infop> depends on the "
"implementation. To (portably) distinguish this case from that where a child "
"was in a waitable state, zero out the I<si_pid> field before the call and "
"check for a nonzero value in this field after the call returns."
msgstr ""
"Если в I<options> указан флаг B<WNOHANG> и нет потомков в состоянии "
"ожидания, то B<waitid>() сразу возвращает 0, а состояние структуры "
"I<siginfo_t>, на которую указывает I<infop>, зависит от реализации. Чтобы "
"(точно) отличать этот случай от того, что потомок был в ожидаемом состоянии, "
"обнулите поле I<si_pid> перед вызовом и проверьте ненулевое значение в этом "
"поле после отработки вызова."
#. POSIX.1-2001 leaves this possibility unspecified; most
#. implementations (including Linux) zero out the structure
#. in this case, but at least one implementation (AIX 5.1)
#. does not -- MTK Nov 04
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"POSIX.1-2008 Technical Corrigendum 1 (2013) adds the requirement that when "
"B<WNOHANG> is specified in I<options> and there were no children in a "
"waitable state, then B<waitid>() should zero out the I<si_pid> and "
"I<si_signo> fields of the structure. On Linux and other implementations "
"that adhere to this requirement, it is not necessary to zero out the "
"I<si_pid> field before calling B<waitid>(). However, not all "
"implementations follow the POSIX.1 specification on this point."
msgstr ""
"В POSIX.1-2008 Technical Corrigendum 1 (2013) добавлено требование, что при "
"указании B<WNOHANG> в I<options> и нет потомков в состоянии ожидания, то "
"вызов B<waitid>() должен возвращать в структуре обнулённые поля I<si_pid> и "
"I<si_signo>. В Linux и других реализациях придерживаются этого требования, "
"поэтому не нужно обнулять поле I<si_pid> перед вызовом B<waitid>(). Однако в "
"этом не все реализации следуют POSIX.1."
#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "RETURN VALUE"
msgstr "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, fuzzy
#| msgid ""
#| "B<wait>(): on success, returns the process ID of the terminated child; on "
#| "error, -1 is returned."
msgid ""
"B<wait>(): on success, returns the process ID of the terminated child; on "
"failure, -1 is returned."
msgstr ""
"В случае успешного выполнения B<wait>() возвращает ID процесса "
"завершившегося потомка; при ошибке возвращается -1."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, fuzzy
#| msgid ""
#| "B<waitpid>(): on success, returns the process ID of the child whose state "
#| "has changed; if B<WNOHANG> was specified and one or more child(ren) "
#| "specified by I<pid> exist, but have not yet changed state, then 0 is "
#| "returned. On error, -1 is returned."
msgid ""
"B<waitpid>(): on success, returns the process ID of the child whose state "
"has changed; if B<WNOHANG> was specified and one or more child(ren) "
"specified by I<pid> exist, but have not yet changed state, then 0 is "
"returned. On failure, -1 is returned."
msgstr ""
"В случае успешного выполнения B<waitpid>() возвращает ID процесса потомка, "
"чьё состояние изменилось; если задан флаг B<WNOHANG> и существует один или "
"более потомков, заданных в I<pid>, без изменённого состояния, то "
"возвращается 0. При ошибке возвращается -1."
#. FIXME As reported by Vegard Nossum, if infop is NULL, then waitid()
#. returns the PID of the child. Either this is a bug, or it is intended
#. behavior that needs to be documented. See my Jan 2009 LKML mail
#. "waitid() return value strangeness when infop is NULL".
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, fuzzy
#| msgid ""
#| "B<waitid>(): returns 0 on success or if B<WNOHANG> was specified and no "
#| "child(ren) specified by I<id> has yet changed state; on error, -1 is "
#| "returned."
msgid ""
"B<waitid>(): returns 0 on success or if B<WNOHANG> was specified and no "
"child(ren) specified by I<id> has yet changed state; on failure, -1 is "
"returned."
msgstr ""
"Вызов B<waitid>() возвращает 0 в случае успешного выполнения или если задан "
"флаг B<WNOHANG> и пока не существует потомка(ов), указанного в I<pid>,с "
"изменённым состоянием. При ошибке возвращается -1."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, fuzzy
#| msgid ""
#| "Each of these calls sets I<errno> to an appropriate value in the case of "
#| "an error."
msgid "On failure, each of these calls sets I<errno> to indicate the error."
msgstr ""
"Каждый из этих вызовов записывает в I<errno> соответствующую причину ошибки."
#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "ERRORS"
msgstr "ОШИБКИ"
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<EAGAIN>"
msgstr "B<EAGAIN>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The PID file descriptor specified in I<id> is nonblocking and the process "
"that it refers to has not terminated."
msgstr ""
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<ECHILD>"
msgstr "B<ECHILD>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"(for B<wait>()) The calling process does not have any unwaited-for children."
msgstr "(для B<wait>()) У вызвавшего процесса нет ожидающих потомков."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"(for B<waitpid>() or B<waitid>()) The process specified by I<pid> "
"(B<waitpid>()) or I<idtype> and I<id> (B<waitid>()) does not exist or is "
"not a child of the calling process. (This can happen for one's own child if "
"the action for B<SIGCHLD> is set to B<SIG_IGN>. See also the I<Linux Notes> "
"section about threads.)"
msgstr ""
"(для B<waitpid>() или B<waitid>()) Процесс, заданный I<pid> (B<waitpid>()) "
"или I<idtype> и I<id> (B<waitid>()), не существует или не является потомком "
"вызвавшего процесса. (Это может случиться для своего потомка, если действие "
"для B<SIGCHLD> установлено в B<SIG_IGN>. См. также раздел I<Linux Notes> о "
"нитях.)"
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<EINTR>"
msgstr "B<EINTR>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"B<WNOHANG> was not set and an unblocked signal or a B<SIGCHLD> was caught; "
"see B<signal>(7)."
msgstr ""
"Флаг B<WNOHANG> не задан и был пойман неблокируемый сигнал или B<SIGCHLD>; "
"см. B<signal>(7)."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<EINVAL>"
msgstr "B<EINVAL>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "The I<options> argument was invalid."
msgstr "Недопустимое значение I<options>."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<ESRCH>"
msgstr "B<ESRCH>"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "(for B<wait>() or B<waitpid>()) I<pid> is equal to B<INT_MIN>."
msgstr ""
#. type: SH
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "VERSIONS"
msgstr "ВЕРСИИ"
#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "C library/kernel differences"
msgstr "Отличия между библиотекой C и ядром"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"B<wait>() is actually a library function that (in glibc) is implemented as "
"a call to B<wait4>(2)."
msgstr ""
"В действительности, B<wait>() — библиотечная функция, которая (в glibc) "
"реализована через вызов B<wait4>(2)."
#. e.g., i386 has the system call, but not x86-64
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"On some architectures, there is no B<waitpid>() system call; instead, this "
"interface is implemented via a C library wrapper function that calls "
"B<wait4>(2)."
msgstr ""
"Для некоторых архитектур нет системного вызова B<waitpid>(); его заменяет "
"интерфейс, реализованный через обёрточную функцию библиотеки C, которая "
"вызывает B<wait4>(2)."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The raw B<waitid>() system call takes a fifth argument, of type I<struct "
"rusage\\ *>. If this argument is non-NULL, then it is used to return "
"resource usage information about the child, in the same manner as "
"B<wait4>(2). See B<getrusage>(2) for details."
msgstr ""
"Системный вызов ядра B<waitid>() имеет пятый аргумент с типом I<struct rusage"
"\\ *>. Если его значение не равно NULL, то он используется для возврата "
"информации по используемым ресурсам в потомке, в том же виде что и "
"B<wait4>(2). Подробности смотрите в B<getrusage>(2)."
#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "STANDARDS"
msgstr "СТАНДАРТЫ"
#. type: Plain text
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-leap-15-6 opensuse-tumbleweed
msgid "POSIX.1-2008."
msgstr "POSIX.1-2008."
#. type: SH
#: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron
#: opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "HISTORY"
msgstr "ИСТОРИЯ"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "SVr4, 4.3BSD, POSIX.1-2001."
msgstr "SVr4, 4.3BSD, POSIX.1-2001."
#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "NOTES"
msgstr "ПРИМЕЧАНИЯ"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"A child that terminates, but has not been waited for becomes a \"zombie\". "
"The kernel maintains a minimal set of information about the zombie process "
"(PID, termination status, resource usage information) in order to allow the "
"parent to later perform a wait to obtain information about the child. As "
"long as a zombie is not removed from the system via a wait, it will consume "
"a slot in the kernel process table, and if this table fills, it will not be "
"possible to create further processes. If a parent process terminates, then "
"its \"zombie\" children (if any) are adopted by B<init>(1), (or by the "
"nearest \"subreaper\" process as defined through the use of the B<prctl>(2) "
"B<PR_SET_CHILD_SUBREAPER> operation); B<init>(1) automatically performs a "
"wait to remove the zombies."
msgstr ""
"Потомок, который завершился, но которого не ждали, становится "
"«зомби» (zombie). Ядро поддерживает минимальный набор информации о процессах "
"зомби (PID, состояние завершения, использованные ресурсы), чтобы позже "
"позволить родителю выполнить процесс ожидания для получения информации о "
"потомке. До тех пор, пока зомби не будет удалён из системы через процесс "
"ожидания (wait), он занимает пространство (slot) в таблице процессов ядра, и "
"если таблица заполнится, станет невозможно создавать новые процессы. Если "
"родительский процесс завершает работу, то его потомки «зомби» (если есть) "
"усыновляются процессом B<init>(1) (или ближайшим «сборщиком», определённым "
"посредством вызова B<prctl>(2)с операцией B<PR_SET_CHILD_SUBREAPER>); "
"B<init>(1) автоматически выполняет процедуру ожидания для удаления зомби."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"POSIX.1-2001 specifies that if the disposition of B<SIGCHLD> is set to "
"B<SIG_IGN> or the B<SA_NOCLDWAIT> flag is set for B<SIGCHLD> (see "
"B<sigaction>(2)), then children that terminate do not become zombies and a "
"call to B<wait>() or B<waitpid>() will block until all children have "
"terminated, and then fail with I<errno> set to B<ECHILD>. (The original "
"POSIX standard left the behavior of setting B<SIGCHLD> to B<SIG_IGN> "
"unspecified. Note that even though the default disposition of B<SIGCHLD> is "
"\"ignore\", explicitly setting the disposition to B<SIG_IGN> results in "
"different treatment of zombie process children.)"
msgstr ""
"В POSIX.1-2001 указано, что если для B<SIGCHLD> указан флаг B<SIG_IGN> или "
"B<SA_NOCLDWAIT> (смотрите B<sigaction>(2)), то завершающиеся потомки не "
"становятся зомби, а вызов B<wait>() или B<waitpid>() заблокирует выполнение "
"до тех пор, пока все потомки не завершат работу, и затем завершится с "
"ошибкой I<errno>, равной B<ECHILD> (в оригинальном стандарте POSIX такое "
"значение настройки B<SIGCHLD> в B<SIG_IGN> не определено. Заметим, что хотя "
"поведение B<SIGCHLD> по умолчанию является «игнорирование», явная установка "
"в B<SIG_IGN> приводит другому обращению с потомками зомби)."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Linux 2.6 conforms to the POSIX requirements. However, Linux 2.4 (and "
"earlier) does not: if a B<wait>() or B<waitpid>() call is made while "
"B<SIGCHLD> is being ignored, the call behaves just as though B<SIGCHLD> were "
"not being ignored, that is, the call blocks until the next child terminates "
"and then returns the process ID and status of that child."
msgstr ""
"Linux 2.6 соответствует данной спецификации. Однако, Linux 2.4 (и ранее) не "
"соответствует: если вызов B<wait>() или B<waitpid>() сделан при "
"игнорировании B<SIGCHLD>, вызов работает как если бы B<SIGCHLD> не "
"игнорировался, то есть, вызов блокирует работу до тех пор, пока следующий "
"потомок не завершит работу и затем возвращает ID процесса и состояние этого "
"потомка."
#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "Linux notes"
msgstr "Замечания, касающиеся Linux"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"In the Linux kernel, a kernel-scheduled thread is not a distinct construct "
"from a process. Instead, a thread is simply a process that is created using "
"the Linux-unique B<clone>(2) system call; other routines such as the "
"portable B<pthread_create>(3) call are implemented using B<clone>(2). "
"Before Linux 2.4, a thread was just a special case of a process, and as a "
"consequence one thread could not wait on the children of another thread, "
"even when the latter belongs to the same thread group. However, POSIX "
"prescribes such functionality, and since Linux 2.4 a thread can, and by "
"default will, wait on children of other threads in the same thread group."
msgstr ""
"В ядре Linux нити, управляемые ядром, устройством не отличаются от процесса. "
"Нить \\(em это просто процесс, который создан уникальным (существующим "
"только в Linux) системным вызовом B<clone>(2); другие процедуры, такие как "
"переносимая версия B<pthread_create>(3), также реализованы с помощью "
"B<clone>(2). До Linux 2.4, нить представляла собой специализированный "
"вариант процесса, и, как следствие, нить не могла ждать потомков другой "
"нити, даже когда последняя принадлежала той же группе нитей. Однако, в POSIX "
"вписали такую функциональность, и, начиная с Linux 2.4, нить может, и по "
"умолчанию будет ждать потомков других нитей в той же группе нитей."
#. commit 91c4e8ea8f05916df0c8a6f383508ac7c9e10dba
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The following Linux-specific I<options> are for use with children created "
"using B<clone>(2); they can also, since Linux 4.7, be used with B<waitid>():"
msgstr ""
"Следующие значения I<options>, присущие только Linux, используются для "
"потомков, созданных с помощью B<clone>(2); начиная с Linux 4.7, они также "
"могут использоваться с B<waitid>():"
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<__WCLONE>"
msgstr "B<__WCLONE>"
#. since 0.99pl10
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Wait for \"clone\" children only. If omitted, then wait for \"non-clone\" "
"children only. (A \"clone\" child is one which delivers no signal, or a "
"signal other than B<SIGCHLD> to its parent upon termination.) This option "
"is ignored if B<__WALL> is also specified."
msgstr ""
"Ждать только «клонированных (clone)» потомков. Если не указано, то ожидаются "
"только «не клонированные» потомки («клонированным» считается потомок, "
"который не доставляет сигнал, или сигнал, отличный от B<SIGCHLD>, своему "
"родителю при завершении). Этот аргумент игнорируется, если также указано "
"B<__WALL>."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<__WALL> (since Linux 2.4)"
msgstr "B<__WALL> (начиная с Linux 2.4)"
#. since patch-2.3.48
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "Wait for all children, regardless of type (\"clone\" or \"non-clone\")."
msgstr ""
"Ждать всех потомков независимо от типа (\"клонированный\" или "
"\"неклонированный\")."
#. type: TP
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "B<__WNOTHREAD> (since Linux 2.4)"
msgstr "B<__WNOTHREAD> (начиная с Linux 2.4)"
#. since patch-2.4.0-test8
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Do not wait for children of other threads in the same thread group. This "
"was the default before Linux 2.4."
msgstr ""
"Не ждать потомков других нитей в той же группе нитей. Это поведение по "
"умолчанию до Linux 2.4."
#. commit bf959931ddb88c4e4366e96dd22e68fa0db9527c
#. prevents cases where an unreapable zombie is created if
#. /sbin/init doesn't use __WALL.
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"Since Linux 4.7, the B<__WALL> flag is automatically implied if the child is "
"being ptraced."
msgstr ""
"Начиная с Linux 4.7, в случае, когда потомок был вызван с помощью ptrace, "
"флаг B<__WALL> назначается автоматически."
#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "BUGS"
msgstr "ОШИБКИ"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"According to POSIX.1-2008, an application calling B<waitid>() must ensure "
"that I<infop> points to a I<siginfo_t> structure (i.e., that it is a non-"
"null pointer). On Linux, if I<infop> is NULL, B<waitid>() succeeds, and "
"returns the process ID of the waited-for child. Applications should avoid "
"relying on this inconsistent, nonstandard, and unnecessary feature."
msgstr ""
"Согласно POSIX.1-2008, приложение, вызывающее B<waitid>(), должно убедиться, "
"что I<infop> указывает на структуру I<siginfo_t> (т. е., что это указатель "
"не равен null). В Linux, если I<infop> равно NULL, то B<waitid>() "
"выполняется успешно и возвращает ID процесса ожидавшегося потомка. "
"Приложения не должны полагаться на это несогласованное, нестандартное и "
"ненужное свойство."
#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "EXAMPLES"
msgstr "ПРИМЕРЫ"
#. fork.2 refers to this example program.
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"The following program demonstrates the use of B<fork>(2) and B<waitpid>(). "
"The program creates a child process. If no command-line argument is "
"supplied to the program, then the child suspends its execution using "
"B<pause>(2), to allow the user to send signals to the child. Otherwise, if "
"a command-line argument is supplied, then the child exits immediately, using "
"the integer supplied on the command line as the exit status. The parent "
"process executes a loop that monitors the child using B<waitpid>(), and uses "
"the W*() macros described above to analyze the wait status value."
msgstr ""
"В следующей программе показано использование B<fork>(2) и B<waitpid>(). "
"Программа создаёт процесс потомок. Если программа запущена без параметров, "
"то потомок приостанавливает выполнение с помощью B<pause>(2), чтобы "
"позволить пользователю послать сигнал потомку. Иначе, если в командной "
"строке задан параметр, то потомок завершает работу сразу, используя "
"переданное в параметре командной строки целое число как код завершения. "
"Процесс родитель работает в цикле, следя за потомком с помощью B<waitpid>(), "
"и использует макросы W*(), описанные ранее, для анализа значения состояния "
"ожидания."
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid "The following shell session demonstrates the use of the program:"
msgstr "Следующий сеанс работы в оболочке показывает работу с программой:"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid ""
"$B< ./a.out &>\n"
"Child PID is 32360\n"
"[1] 32359\n"
"$B< kill -STOP 32360>\n"
"stopped by signal 19\n"
"$B< kill -CONT 32360>\n"
"continued\n"
"$B< kill -TERM 32360>\n"
"killed by signal 15\n"
"[1]+ Done ./a.out\n"
"$\n"
msgstr ""
"$B< ./a.out &>\n"
"Child PID is 32360\n"
"[1] 32359\n"
"$B< kill -STOP 32360>\n"
"stopped by signal 19\n"
"$B< kill -CONT 32360>\n"
"continued\n"
"$B< kill -TERM 32360>\n"
"killed by signal 15\n"
"[1]+ Done ./a.out\n"
"$\n"
#. type: SS
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "Program source"
msgstr "Исходный код программы"
#. type: Plain text
#: archlinux debian-unstable opensuse-tumbleweed
#, no-wrap
msgid ""
"#include E<lt>stdint.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"
"#include E<lt>sys/types.hE<gt>\n"
"#include E<lt>sys/wait.hE<gt>\n"
"#include E<lt>unistd.hE<gt>\n"
"\\&\n"
"int\n"
"main(int argc, char *argv[])\n"
"{\n"
" int wstatus;\n"
" pid_t cpid, w;\n"
"\\&\n"
" cpid = fork();\n"
" if (cpid == -1) {\n"
" perror(\"fork\");\n"
" exit(EXIT_FAILURE);\n"
" }\n"
"\\&\n"
" if (cpid == 0) { /* Code executed by child */\n"
" printf(\"Child PID is %jd\\en\", (intmax_t) getpid());\n"
" if (argc == 1)\n"
" pause(); /* Wait for signals */\n"
" _exit(atoi(argv[1]));\n"
"\\&\n"
" } else { /* Code executed by parent */\n"
" do {\n"
" w = waitpid(cpid, &wstatus, WUNTRACED | WCONTINUED);\n"
" if (w == -1) {\n"
" perror(\"waitpid\");\n"
" exit(EXIT_FAILURE);\n"
" }\n"
"\\&\n"
" if (WIFEXITED(wstatus)) {\n"
" printf(\"exited, status=%d\\en\", WEXITSTATUS(wstatus));\n"
" } else if (WIFSIGNALED(wstatus)) {\n"
" printf(\"killed by signal %d\\en\", WTERMSIG(wstatus));\n"
" } else if (WIFSTOPPED(wstatus)) {\n"
" printf(\"stopped by signal %d\\en\", WSTOPSIG(wstatus));\n"
" } else if (WIFCONTINUED(wstatus)) {\n"
" printf(\"continued\\en\");\n"
" }\n"
" } while (!WIFEXITED(wstatus) && !WIFSIGNALED(wstatus));\n"
" exit(EXIT_SUCCESS);\n"
" }\n"
"}\n"
msgstr ""
#. SRC END
#. type: SH
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
#, no-wrap
msgid "SEE ALSO"
msgstr "СМОТРИТЕ ТАКЖЕ"
#. type: Plain text
#: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide
#: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed
msgid ""
"B<_exit>(2), B<clone>(2), B<fork>(2), B<kill>(2), B<ptrace>(2), "
"B<sigaction>(2), B<signal>(2), B<wait4>(2), B<pthread_create>(3), "
"B<core>(5), B<credentials>(7), B<signal>(7)"
msgstr ""
"B<_exit>(2), B<clone>(2), B<fork>(2), B<kill>(2), B<ptrace>(2), "
"B<sigaction>(2), B<signal>(2), B<wait4>(2), B<pthread_create>(3), "
"B<core>(5), B<credentials>(7), B<signal>(7)"
#. type: TH
#: debian-bookworm
#, no-wrap
msgid "2023-02-05"
msgstr "5 февраля 2023 г."
#. type: TH
#: debian-bookworm
#, no-wrap
msgid "Linux man-pages 6.03"
msgstr "Linux man-pages 6.03"
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"#include E<lt>stdint.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"
"#include E<lt>sys/wait.hE<gt>\n"
"#include E<lt>unistd.hE<gt>\n"
msgstr ""
"#include E<lt>stdint.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"
"#include E<lt>sys/wait.hE<gt>\n"
"#include E<lt>unistd.hE<gt>\n"
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
"int\n"
"main(int argc, char *argv[])\n"
"{\n"
" int wstatus;\n"
" pid_t cpid, w;\n"
msgstr ""
"int\n"
"main(int argc, char *argv[])\n"
"{\n"
" int wstatus;\n"
" pid_t cpid, w;\n"
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
" cpid = fork();\n"
" if (cpid == -1) {\n"
" perror(\"fork\");\n"
" exit(EXIT_FAILURE);\n"
" }\n"
msgstr ""
" cpid = fork();\n"
" if (cpid == -1) {\n"
" perror(\"fork\");\n"
" exit(EXIT_FAILURE);\n"
" }\n"
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, fuzzy, no-wrap
#| msgid ""
#| " if (cpid == 0) { /* Code executed by child */\n"
#| " printf(\"Child PID is %ld\\en\", (long) getpid());\n"
#| " if (argc == 1)\n"
#| " pause(); /* Wait for signals */\n"
#| " _exit(atoi(argv[1]));\n"
msgid ""
" if (cpid == 0) { /* Code executed by child */\n"
" printf(\"Child PID is %jd\\en\", (intmax_t) getpid());\n"
" if (argc == 1)\n"
" pause(); /* Wait for signals */\n"
" _exit(atoi(argv[1]));\n"
msgstr ""
" if (cpid == 0) { /* Код, выполняемый потомком */\n"
" printf(\"Child PID is %ld\\en\", (long) getpid());\n"
" if (argc == 1)\n"
" pause(); /* Ожидание сигналов */\n"
" _exit(atoi(argv[1]));\n"
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
" } else { /* Code executed by parent */\n"
" do {\n"
" w = waitpid(cpid, &wstatus, WUNTRACED | WCONTINUED);\n"
" if (w == -1) {\n"
" perror(\"waitpid\");\n"
" exit(EXIT_FAILURE);\n"
" }\n"
msgstr ""
" } else { /* Код, выполняемый родителем */\n"
" do {\n"
" w = waitpid(cpid, &wstatus, WUNTRACED | WCONTINUED);\n"
" if (w == -1) {\n"
" perror(\"waitpid\");\n"
" exit(EXIT_FAILURE);\n"
" }\n"
#. type: Plain text
#: debian-bookworm opensuse-leap-15-6
#, no-wrap
msgid ""
" if (WIFEXITED(wstatus)) {\n"
" printf(\"exited, status=%d\\en\", WEXITSTATUS(wstatus));\n"
" } else if (WIFSIGNALED(wstatus)) {\n"
" printf(\"killed by signal %d\\en\", WTERMSIG(wstatus));\n"
" } else if (WIFSTOPPED(wstatus)) {\n"
" printf(\"stopped by signal %d\\en\", WSTOPSIG(wstatus));\n"
" } else if (WIFCONTINUED(wstatus)) {\n"
" printf(\"continued\\en\");\n"
" }\n"
" } while (!WIFEXITED(wstatus) && !WIFSIGNALED(wstatus));\n"
" exit(EXIT_SUCCESS);\n"
" }\n"
"}\n"
msgstr ""
" if (WIFEXITED(wstatus)) {\n"
" printf(\"exited, status=%d\\en\", WEXITSTATUS(wstatus));\n"
" } else if (WIFSIGNALED(wstatus)) {\n"
" printf(\"killed by signal %d\\en\", WTERMSIG(wstatus));\n"
" } else if (WIFSTOPPED(wstatus)) {\n"
" printf(\"stopped by signal %d\\en\", WSTOPSIG(wstatus));\n"
" } else if (WIFCONTINUED(wstatus)) {\n"
" printf(\"continued\\en\");\n"
" }\n"
" } while (!WIFEXITED(wstatus) && !WIFSIGNALED(wstatus));\n"
" exit(EXIT_SUCCESS);\n"
" }\n"
"}\n"
#. type: TH
#: fedora-40 fedora-rawhide mageia-cauldron
#, no-wrap
msgid "2023-10-31"
msgstr "31 октября 2023 г."
#. type: TH
#: fedora-40 mageia-cauldron
#, no-wrap
msgid "Linux man-pages 6.06"
msgstr "Linux man-pages 6.06"
#. type: Plain text
#: fedora-40 fedora-rawhide mageia-cauldron
#, no-wrap
msgid ""
"#include E<lt>stdint.hE<gt>\n"
"#include E<lt>stdio.hE<gt>\n"
"#include E<lt>stdlib.hE<gt>\n"
"#include E<lt>sys/wait.hE<gt>\n"
"#include E<lt>unistd.hE<gt>\n"
"\\&\n"
"int\n"
"main(int argc, char *argv[])\n"
"{\n"
" int wstatus;\n"
" pid_t cpid, w;\n"
"\\&\n"
" cpid = fork();\n"
" if (cpid == -1) {\n"
" perror(\"fork\");\n"
" exit(EXIT_FAILURE);\n"
" }\n"
"\\&\n"
" if (cpid == 0) { /* Code executed by child */\n"
" printf(\"Child PID is %jd\\en\", (intmax_t) getpid());\n"
" if (argc == 1)\n"
" pause(); /* Wait for signals */\n"
" _exit(atoi(argv[1]));\n"
"\\&\n"
" } else { /* Code executed by parent */\n"
" do {\n"
" w = waitpid(cpid, &wstatus, WUNTRACED | WCONTINUED);\n"
" if (w == -1) {\n"
" perror(\"waitpid\");\n"
" exit(EXIT_FAILURE);\n"
" }\n"
"\\&\n"
" if (WIFEXITED(wstatus)) {\n"
" printf(\"exited, status=%d\\en\", WEXITSTATUS(wstatus));\n"
" } else if (WIFSIGNALED(wstatus)) {\n"
" printf(\"killed by signal %d\\en\", WTERMSIG(wstatus));\n"
" } else if (WIFSTOPPED(wstatus)) {\n"
" printf(\"stopped by signal %d\\en\", WSTOPSIG(wstatus));\n"
" } else if (WIFCONTINUED(wstatus)) {\n"
" printf(\"continued\\en\");\n"
" }\n"
" } while (!WIFEXITED(wstatus) && !WIFSIGNALED(wstatus));\n"
" exit(EXIT_SUCCESS);\n"
" }\n"
"}\n"
msgstr ""
#. type: TH
#: fedora-rawhide
#, no-wrap
msgid "Linux man-pages 6.7"
msgstr "Linux man-pages 6.7"
#. type: TH
#: opensuse-leap-15-6
#, no-wrap
msgid "2023-03-30"
msgstr "30 марта 2023 г."
#. type: TH
#: opensuse-leap-15-6
#, no-wrap
msgid "Linux man-pages 6.04"
msgstr "Linux man-pages 6.04"
#. type: TH
#: opensuse-tumbleweed
#, fuzzy, no-wrap
#| msgid "Linux man-pages 6.7"
msgid "Linux man-pages (unreleased)"
msgstr "Linux man-pages 6.7"
|