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
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
|
.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "POSIX 3perl"
.TH POSIX 3perl 2024-05-30 "perl v5.38.2" "Perl Programmers Reference Guide"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
POSIX \- Perl interface to IEEE Std 1003.1
.SH SYNOPSIS
.IX Header "SYNOPSIS"
.Vb 3
\& use POSIX ();
\& use POSIX qw(setsid);
\& use POSIX qw(:errno_h :fcntl_h);
\&
\& printf "EINTR is %d\en", EINTR;
\&
\& my $sess_id = POSIX::setsid();
\&
\& my $fd = POSIX::open($path, O_CREAT|O_EXCL|O_WRONLY, 0644);
\& # note: that\*(Aqs a filedescriptor, *NOT* a filehandle
.Ve
.SH DESCRIPTION
.IX Header "DESCRIPTION"
The POSIX module permits you to access all (or nearly all) the standard
POSIX 1003.1 identifiers. Many of these identifiers have been given Perl-ish
interfaces.
.PP
This document gives a condensed list of the features available in the POSIX
module. Consult your operating system's manpages for general information on
most features. Consult perlfunc for functions which are noted as being
identical or almost identical to Perl's builtin functions.
.PP
The first section describes POSIX functions from the 1003.1 specification.
The second section describes some classes for signal objects, TTY objects,
and other miscellaneous objects. The remaining sections list various
constants and macros in an organization which roughly follows IEEE Std
1003.1b\-1993.
.PP
The notation \f(CW\*(C`[C99]\*(C'\fR indicates functions that were added in the ISO/IEC
9899:1999 version of the C language standard. Some may not be available
on your system if it adheres to an earlier standard. Attempts to use
any missing one will result in a fatal runtime error message.
.SH CAVEATS
.IX Header "CAVEATS"
\&\fIEverything is exported by default\fR (with a handful of exceptions).
This is an unfortunate backwards compatibility feature and its use is
\&\fBstrongly discouraged\fR.
You should either prevent the exporting (by saying \f(CW\*(C`use\ POSIX\ ();\*(C'\fR,
as usual) and then use fully qualified names (e.g. \f(CW\*(C`POSIX::SEEK_END\*(C'\fR),
or give an explicit import list.
If you do neither and opt for the default (as in \f(CW\*(C`use\ POSIX;\*(C'\fR), you
will import \fIhundreds and hundreds\fR of symbols into your namespace.
.PP
A few functions are not implemented because they are C specific. If you
attempt to call these, they will print a message telling you that they
aren't implemented, and suggest using the Perl equivalent, should one
exist. For example, trying to access the \f(CWsetjmp()\fR call will elicit the
message "\f(CW\*(C`setjmp() is C\-specific: use eval {} instead\*(C'\fR".
.PP
Furthermore, some evil vendors will claim 1003.1 compliance, but in fact
are not so: they will not pass the PCTS (POSIX Compliance Test Suites).
For example, one vendor may not define \f(CW\*(C`EDEADLK\*(C'\fR, or the semantics of the
errno values set by \f(CWopen(2)\fR might not be quite right. Perl does not
attempt to verify POSIX compliance. That means you can currently
successfully say "use POSIX", and then later in your program you find
that your vendor has been lax and there's no usable \f(CW\*(C`ICANON\*(C'\fR macro after
all. This could be construed to be a bug.
.SH FUNCTIONS
.IX Header "FUNCTIONS"
.ie n .IP """_exit""" 8
.el .IP \f(CW_exit\fR 8
.IX Item "_exit"
This is identical to the C function \f(CW_exit()\fR. It exits the program
immediately which means among other things buffered I/O is \fBnot\fR flushed.
.Sp
Note that when using threads and in Linux this is \fBnot\fR a good way to
exit a thread because in Linux processes and threads are kind of the
same thing (Note: while this is the situation in early 2003 there are
projects under way to have threads with more POSIXly semantics in Linux).
If you want not to return from a thread, detach the thread.
.ie n .IP """abort""" 8
.el .IP \f(CWabort\fR 8
.IX Item "abort"
This is identical to the C function \f(CWabort()\fR. It terminates the
process with a \f(CW\*(C`SIGABRT\*(C'\fR signal unless caught by a signal handler or
if the handler does not return normally (it e.g. does a \f(CW\*(C`longjmp\*(C'\fR).
.ie n .IP """abs""" 8
.el .IP \f(CWabs\fR 8
.IX Item "abs"
This is identical to Perl's builtin \f(CWabs()\fR function, returning the absolute
value of its numerical argument (except that \f(CWPOSIX::abs()\fR must be provided
an explicit value (rather than relying on an implicit \f(CW$_\fR):
.Sp
.Vb 1
\& $absolute_value = POSIX::abs(42); # good
\&
\& $absolute_value = POSIX::abs(); # throws exception
.Ve
.ie n .IP """access""" 8
.el .IP \f(CWaccess\fR 8
.IX Item "access"
Determines the accessibility of a file.
.Sp
.Vb 3
\& if( POSIX::access( "/", &POSIX::R_OK ) ){
\& print "have read permission\en";
\& }
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure. Note: do not use \f(CWaccess()\fR for
security purposes. Between the \f(CWaccess()\fR call and the operation
you are preparing for the permissions might change: a classic
\&\fIrace condition\fR.
.ie n .IP """acos""" 8
.el .IP \f(CWacos\fR 8
.IX Item "acos"
This is identical to the C function \f(CWacos()\fR, returning
the arcus cosine of its numerical argument. See also Math::Trig.
.ie n .IP """acosh""" 8
.el .IP \f(CWacosh\fR 8
.IX Item "acosh"
This is identical to the C function \f(CWacosh()\fR, returning the
hyperbolic arcus cosine of its numerical argument [C99]. See also
Math::Trig. Added in Perl v5.22.
.ie n .IP """alarm""" 8
.el .IP \f(CWalarm\fR 8
.IX Item "alarm"
This is identical to Perl's builtin \f(CWalarm()\fR function, either for arming or
disarming the \f(CW\*(C`SIGARLM\*(C'\fR timer, except that \f(CWPOSIX::alarm()\fR must be provided
an explicit value (rather than relying on an implicit \f(CW$_\fR):
.Sp
.Vb 1
\& POSIX::alarm(3) # good
\&
\& POSIX::alarm() # throws exception
.Ve
.ie n .IP """asctime""" 8
.el .IP \f(CWasctime\fR 8
.IX Item "asctime"
This is identical to the C function \f(CWasctime()\fR. It returns
a string of the form
.Sp
.Vb 1
\& "Fri Jun 2 18:22:13 2000\en\e0"
.Ve
.Sp
and it is called thusly
.Sp
.Vb 2
\& $asctime = asctime($sec, $min, $hour, $mday, $mon,
\& $year, $wday, $yday, $isdst);
.Ve
.Sp
The \f(CW$mon\fR is zero-based: January equals \f(CW0\fR. The \f(CW$year\fR is
1900\-based: 2001 equals \f(CW101\fR. \f(CW$wday\fR and \f(CW$yday\fR default to zero
(and are usually ignored anyway), and \f(CW$isdst\fR defaults to \-1.
.Sp
Note the result is always in English. Use \f(CW"strftime"\fR instead to
get a result suitable for the current locale. That function's \f(CW%c\fR
format yields the locale's preferred representation.
.ie n .IP """asin""" 8
.el .IP \f(CWasin\fR 8
.IX Item "asin"
This is identical to the C function \f(CWasin()\fR, returning
the arcus sine of its numerical argument. See also Math::Trig.
.ie n .IP """asinh""" 8
.el .IP \f(CWasinh\fR 8
.IX Item "asinh"
This is identical to the C function \f(CWasinh()\fR, returning the
hyperbolic arcus sine of its numerical argument [C99]. See also
Math::Trig. Added in Perl v5.22.
.ie n .IP """assert""" 8
.el .IP \f(CWassert\fR 8
.IX Item "assert"
Unimplemented, but you can use "die" in perlfunc and the Carp module
to achieve similar things.
.ie n .IP """atan""" 8
.el .IP \f(CWatan\fR 8
.IX Item "atan"
This is identical to the C function \f(CWatan()\fR, returning the
arcus tangent of its numerical argument. See also Math::Trig.
.ie n .IP """atanh""" 8
.el .IP \f(CWatanh\fR 8
.IX Item "atanh"
This is identical to the C function \f(CWatanh()\fR, returning the
hyperbolic arcus tangent of its numerical argument [C99]. See also
Math::Trig. Added in Perl v5.22.
.ie n .IP """atan2""" 8
.el .IP \f(CWatan2\fR 8
.IX Item "atan2"
This is identical to Perl's builtin \f(CWatan2()\fR function, returning
the arcus tangent defined by its two numerical arguments, the \fIy\fR
coordinate and the \fIx\fR coordinate. See also Math::Trig.
.ie n .IP """atexit""" 8
.el .IP \f(CWatexit\fR 8
.IX Item "atexit"
Not implemented. \f(CWatexit()\fR is C\-specific: use \f(CW\*(C`END {}\*(C'\fR instead, see perlmod.
.ie n .IP """atof""" 8
.el .IP \f(CWatof\fR 8
.IX Item "atof"
Not implemented. \f(CWatof()\fR is C\-specific. Perl converts strings to numbers transparently.
If you need to force a scalar to a number, add a zero to it.
.ie n .IP """atoi""" 8
.el .IP \f(CWatoi\fR 8
.IX Item "atoi"
Not implemented. \f(CWatoi()\fR is C\-specific. Perl converts strings to numbers transparently.
If you need to force a scalar to a number, add a zero to it.
If you need to have just the integer part, see "int" in perlfunc.
.ie n .IP """atol""" 8
.el .IP \f(CWatol\fR 8
.IX Item "atol"
Not implemented. \f(CWatol()\fR is C\-specific. Perl converts strings to numbers transparently.
If you need to force a scalar to a number, add a zero to it.
If you need to have just the integer part, see "int" in perlfunc.
.ie n .IP """bsearch""" 8
.el .IP \f(CWbsearch\fR 8
.IX Item "bsearch"
\&\f(CWbsearch()\fR not supplied. For doing binary search on wordlists,
see Search::Dict.
.ie n .IP """calloc""" 8
.el .IP \f(CWcalloc\fR 8
.IX Item "calloc"
Not implemented. \f(CWcalloc()\fR is C\-specific. Perl does memory management transparently.
.ie n .IP """cbrt""" 8
.el .IP \f(CWcbrt\fR 8
.IX Item "cbrt"
The cube root [C99]. Added in Perl v5.22.
.ie n .IP """ceil""" 8
.el .IP \f(CWceil\fR 8
.IX Item "ceil"
This is identical to the C function \f(CWceil()\fR, returning the smallest
integer value greater than or equal to the given numerical argument.
.ie n .IP """chdir""" 8
.el .IP \f(CWchdir\fR 8
.IX Item "chdir"
This is identical to Perl's builtin \f(CWchdir()\fR function, allowing one to
change the working (default) directory \-\- see "chdir" in perlfunc \-\- with the
exception that \f(CWPOSIX::chdir()\fR must be provided an explicit value (rather
than relying on an implicit \f(CW$_\fR):
.Sp
.Vb 1
\& $rv = POSIX::chdir(\*(Aqpath/to/dir\*(Aq); # good
\&
\& $rv = POSIX::chdir(); # throws exception
.Ve
.ie n .IP """chmod""" 8
.el .IP \f(CWchmod\fR 8
.IX Item "chmod"
This is identical to Perl's builtin \f(CWchmod()\fR function, allowing
one to change file and directory permissions \-\- see "chmod" in perlfunc \-\- with
the exception that \f(CWPOSIX::chmod()\fR can only change one file at a time
(rather than a list of files):
.Sp
.Vb 1
\& $c = chmod 0664, $file1, $file2; # good
\&
\& $c = POSIX::chmod 0664, $file1; # throws exception
\&
\& $c = POSIX::chmod 0664, $file1, $file2; # throws exception
.Ve
.Sp
As with the built-in \f(CWchmod()\fR, \f(CW$file\fR may be a filename or a file
handle.
.ie n .IP """chown""" 8
.el .IP \f(CWchown\fR 8
.IX Item "chown"
This is identical to Perl's builtin \f(CWchown()\fR function, allowing one
to change file and directory owners and groups, see "chown" in perlfunc.
.ie n .IP """clearerr""" 8
.el .IP \f(CWclearerr\fR 8
.IX Item "clearerr"
Not implemented. Use the method \f(CWIO::Handle::clearerr()\fR instead, to reset the error
state (if any) and EOF state (if any) of the given stream.
.ie n .IP """clock""" 8
.el .IP \f(CWclock\fR 8
.IX Item "clock"
This is identical to the C function \f(CWclock()\fR, returning the
amount of spent processor time in microseconds.
.ie n .IP """close""" 8
.el .IP \f(CWclose\fR 8
.IX Item "close"
Close the file. This uses file descriptors such as those obtained by calling
\&\f(CW\*(C`POSIX::open\*(C'\fR.
.Sp
.Vb 2
\& $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
\& POSIX::close( $fd );
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.Sp
See also "close" in perlfunc.
.ie n .IP """closedir""" 8
.el .IP \f(CWclosedir\fR 8
.IX Item "closedir"
This is identical to Perl's builtin \f(CWclosedir()\fR function for closing
a directory handle, see "closedir" in perlfunc.
.ie n .IP """cos""" 8
.el .IP \f(CWcos\fR 8
.IX Item "cos"
This is identical to Perl's builtin \f(CWcos()\fR function, for returning
the cosine of its numerical argument, see "cos" in perlfunc.
See also Math::Trig.
.ie n .IP """cosh""" 8
.el .IP \f(CWcosh\fR 8
.IX Item "cosh"
This is identical to the C function \f(CWcosh()\fR, for returning
the hyperbolic cosine of its numeric argument. See also Math::Trig.
.ie n .IP """copysign""" 8
.el .IP \f(CWcopysign\fR 8
.IX Item "copysign"
Returns \f(CW\*(C`x\*(C'\fR but with the sign of \f(CW\*(C`y\*(C'\fR [C99]. Added in Perl v5.22.
.Sp
.Vb 1
\& $x_with_sign_of_y = POSIX::copysign($x, $y);
.Ve
.Sp
See also "signbit".
.ie n .IP """creat""" 8
.el .IP \f(CWcreat\fR 8
.IX Item "creat"
Create a new file. This returns a file descriptor like the ones returned by
\&\f(CW\*(C`POSIX::open\*(C'\fR. Use \f(CW\*(C`POSIX::close\*(C'\fR to close the file.
.Sp
.Vb 2
\& $fd = POSIX::creat( "foo", 0611 );
\& POSIX::close( $fd );
.Ve
.Sp
See also "sysopen" in perlfunc and its \f(CW\*(C`O_CREAT\*(C'\fR flag.
.ie n .IP """ctermid""" 8
.el .IP \f(CWctermid\fR 8
.IX Item "ctermid"
Generates the path name for the controlling terminal.
.Sp
.Vb 1
\& $path = POSIX::ctermid();
.Ve
.ie n .IP """ctime""" 8
.el .IP \f(CWctime\fR 8
.IX Item "ctime"
This is identical to the C function \f(CWctime()\fR and equivalent
to \f(CW\*(C`asctime(localtime(...))\*(C'\fR, see "asctime" and "localtime".
.ie n .IP """cuserid"" [POSIX.1\-1988]" 8
.el .IP "\f(CWcuserid\fR [POSIX.1\-1988]" 8
.IX Item "cuserid [POSIX.1-1988]"
Get the login name of the owner of the current process.
.Sp
.Vb 1
\& $name = POSIX::cuserid();
.Ve
.Sp
Note: this function has not been specified by POSIX since 1990 and is included
only for backwards compatibility. New code should use \f(CWgetlogin()\fR instead.
.ie n .IP """difftime""" 8
.el .IP \f(CWdifftime\fR 8
.IX Item "difftime"
This is identical to the C function \f(CWdifftime()\fR, for returning
the time difference (in seconds) between two times (as returned
by \f(CWtime()\fR), see "time".
.ie n .IP """div""" 8
.el .IP \f(CWdiv\fR 8
.IX Item "div"
Not implemented. \f(CWdiv()\fR is C\-specific, use "int" in perlfunc on the usual \f(CW\*(C`/\*(C'\fR division and
the modulus \f(CW\*(C`%\*(C'\fR.
.ie n .IP """dup""" 8
.el .IP \f(CWdup\fR 8
.IX Item "dup"
This is similar to the C function \f(CWdup()\fR, for duplicating a file
descriptor.
.Sp
This uses file descriptors such as those obtained by calling
\&\f(CW\*(C`POSIX::open\*(C'\fR.
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """dup2""" 8
.el .IP \f(CWdup2\fR 8
.IX Item "dup2"
This is similar to the C function \f(CWdup2()\fR, for duplicating a file
descriptor to an another known file descriptor.
.Sp
This uses file descriptors such as those obtained by calling
\&\f(CW\*(C`POSIX::open\*(C'\fR.
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """erf""" 8
.el .IP \f(CWerf\fR 8
.IX Item "erf"
The error function [C99]. Added in Perl v5.22.
.ie n .IP """erfc""" 8
.el .IP \f(CWerfc\fR 8
.IX Item "erfc"
The complementary error function [C99]. Added in Perl v5.22.
.ie n .IP """errno""" 8
.el .IP \f(CWerrno\fR 8
.IX Item "errno"
Returns the value of errno.
.Sp
.Vb 1
\& $errno = POSIX::errno();
.Ve
.Sp
This identical to the numerical values of the \f(CW$!\fR, see "$ERRNO" in perlvar.
.ie n .IP """execl""" 8
.el .IP \f(CWexecl\fR 8
.IX Item "execl"
Not implemented. \f(CWexecl()\fR is C\-specific, see "exec" in perlfunc.
.ie n .IP """execle""" 8
.el .IP \f(CWexecle\fR 8
.IX Item "execle"
Not implemented. \f(CWexecle()\fR is C\-specific, see "exec" in perlfunc.
.ie n .IP """execlp""" 8
.el .IP \f(CWexeclp\fR 8
.IX Item "execlp"
Not implemented. \f(CWexeclp()\fR is C\-specific, see "exec" in perlfunc.
.ie n .IP """execv""" 8
.el .IP \f(CWexecv\fR 8
.IX Item "execv"
Not implemented. \f(CWexecv()\fR is C\-specific, see "exec" in perlfunc.
.ie n .IP """execve""" 8
.el .IP \f(CWexecve\fR 8
.IX Item "execve"
Not implemented. \f(CWexecve()\fR is C\-specific, see "exec" in perlfunc.
.ie n .IP """execvp""" 8
.el .IP \f(CWexecvp\fR 8
.IX Item "execvp"
Not implemented. \f(CWexecvp()\fR is C\-specific, see "exec" in perlfunc.
.ie n .IP """exit""" 8
.el .IP \f(CWexit\fR 8
.IX Item "exit"
This is identical to Perl's builtin \f(CWexit()\fR function for exiting the
program, see "exit" in perlfunc.
.ie n .IP """exp""" 8
.el .IP \f(CWexp\fR 8
.IX Item "exp"
This is identical to Perl's builtin \f(CWexp()\fR function for
returning the exponent (\fIe\fR\-based) of the numerical argument,
see "exp" in perlfunc.
.ie n .IP """expm1""" 8
.el .IP \f(CWexpm1\fR 8
.IX Item "expm1"
Equivalent to \f(CW\*(C`exp(x) \- 1\*(C'\fR, but more precise for small argument values [C99].
Added in Perl v5.22.
.Sp
See also "log1p".
.ie n .IP """fabs""" 8
.el .IP \f(CWfabs\fR 8
.IX Item "fabs"
This is identical to Perl's builtin \f(CWabs()\fR function for returning
the absolute value of the numerical argument, see "abs" in perlfunc.
.ie n .IP """fclose""" 8
.el .IP \f(CWfclose\fR 8
.IX Item "fclose"
Not implemented. Use method \f(CWIO::Handle::close()\fR instead, or see "close" in perlfunc.
.ie n .IP """fcntl""" 8
.el .IP \f(CWfcntl\fR 8
.IX Item "fcntl"
This is identical to Perl's builtin \f(CWfcntl()\fR function,
see "fcntl" in perlfunc.
.ie n .IP """fdopen""" 8
.el .IP \f(CWfdopen\fR 8
.IX Item "fdopen"
Not implemented. Use method \f(CWIO::Handle::new_from_fd()\fR instead, or see "open" in perlfunc.
.ie n .IP """feof""" 8
.el .IP \f(CWfeof\fR 8
.IX Item "feof"
Not implemented. Use method \f(CWIO::Handle::eof()\fR instead, or see "eof" in perlfunc.
.ie n .IP """ferror""" 8
.el .IP \f(CWferror\fR 8
.IX Item "ferror"
Not implemented. Use method \f(CWIO::Handle::error()\fR instead.
.ie n .IP """fflush""" 8
.el .IP \f(CWfflush\fR 8
.IX Item "fflush"
Not implemented. Use method \f(CWIO::Handle::flush()\fR instead.
See also \f(CW\*(C`"$OUTPUT_AUTOFLUSH" in perlvar\*(C'\fR.
.ie n .IP """fgetc""" 8
.el .IP \f(CWfgetc\fR 8
.IX Item "fgetc"
Not implemented. Use method \f(CWIO::Handle::getc()\fR instead, or see "read" in perlfunc.
.ie n .IP """fgetpos""" 8
.el .IP \f(CWfgetpos\fR 8
.IX Item "fgetpos"
Not implemented. Use method \f(CWIO::Seekable::getpos()\fR instead, or see "seek" in perlfunc.
.ie n .IP """fgets""" 8
.el .IP \f(CWfgets\fR 8
.IX Item "fgets"
Not implemented. Use method \f(CWIO::Handle::gets()\fR instead. Similar to <>, also known
as "readline" in perlfunc.
.ie n .IP """fileno""" 8
.el .IP \f(CWfileno\fR 8
.IX Item "fileno"
Not implemented. Use method \f(CWIO::Handle::fileno()\fR instead, or see "fileno" in perlfunc.
.ie n .IP """floor""" 8
.el .IP \f(CWfloor\fR 8
.IX Item "floor"
This is identical to the C function \f(CWfloor()\fR, returning the largest
integer value less than or equal to the numerical argument.
.ie n .IP """fdim""" 8
.el .IP \f(CWfdim\fR 8
.IX Item "fdim"
"Positive difference", \f(CW\*(C`x\ \-\ y\*(C'\fR if \f(CW\*(C`x\ >\ y\*(C'\fR, zero otherwise [C99].
Added in Perl v5.22.
.ie n .IP """fegetround""" 8
.el .IP \f(CWfegetround\fR 8
.IX Item "fegetround"
Returns the current floating point rounding mode, one of
.Sp
.Vb 1
\& FE_TONEAREST FE_TOWARDZERO FE_UPWARD FE_DOWNWARD
.Ve
.Sp
\&\f(CW\*(C`FE_TONEAREST\*(C'\fR is like "round", \f(CW\*(C`FE_TOWARDZERO\*(C'\fR is like "trunc" [C99].
Added in Perl v5.22.
.ie n .IP """fesetround""" 8
.el .IP \f(CWfesetround\fR 8
.IX Item "fesetround"
Sets the floating point rounding mode, see "fegetround" [C99]. Added in
Perl v5.22.
.ie n .IP """fma""" 8
.el .IP \f(CWfma\fR 8
.IX Item "fma"
"Fused multiply-add", \f(CW\*(C`x\ *\ y\ +\ z\*(C'\fR, possibly faster (and less lossy)
than the explicit two operations [C99]. Added in Perl v5.22.
.Sp
.Vb 1
\& my $fused = POSIX::fma($x, $y, $z);
.Ve
.ie n .IP """fmax""" 8
.el .IP \f(CWfmax\fR 8
.IX Item "fmax"
Maximum of \f(CW\*(C`x\*(C'\fR and \f(CW\*(C`y\*(C'\fR, except when either is \f(CW\*(C`NaN\*(C'\fR, returns the other [C99].
Added in Perl v5.22.
.Sp
.Vb 1
\& my $max = POSIX::fmax($x, $y);
.Ve
.ie n .IP """fmin""" 8
.el .IP \f(CWfmin\fR 8
.IX Item "fmin"
Minimum of \f(CW\*(C`x\*(C'\fR and \f(CW\*(C`y\*(C'\fR, except when either is \f(CW\*(C`NaN\*(C'\fR, returns the other [C99].
Added in Perl v5.22.
.Sp
.Vb 1
\& my $min = POSIX::fmin($x, $y);
.Ve
.ie n .IP """fmod""" 8
.el .IP \f(CWfmod\fR 8
.IX Item "fmod"
This is identical to the C function \f(CWfmod()\fR.
.Sp
.Vb 1
\& $r = fmod($x, $y);
.Ve
.Sp
It returns the remainder \f(CW\*(C`$r\ =\ $x\ \-\ $n*$y\*(C'\fR, where \f(CW\*(C`$n\ =\ trunc($x/$y)\*(C'\fR.
The \f(CW$r\fR has the same sign as \f(CW$x\fR and magnitude (absolute value)
less than the magnitude of \f(CW$y\fR.
.ie n .IP """fopen""" 8
.el .IP \f(CWfopen\fR 8
.IX Item "fopen"
Not implemented. Use method \f(CWIO::File::open()\fR instead, or see "open" in perlfunc.
.ie n .IP """fork""" 8
.el .IP \f(CWfork\fR 8
.IX Item "fork"
This is identical to Perl's builtin \f(CWfork()\fR function
for duplicating the current process, see "fork" in perlfunc
and perlfork if you are in Windows.
.ie n .IP """fpathconf""" 8
.el .IP \f(CWfpathconf\fR 8
.IX Item "fpathconf"
Retrieves the value of a configurable limit on a file or directory. This
uses file descriptors such as those obtained by calling \f(CW\*(C`POSIX::open\*(C'\fR.
.Sp
The following will determine the maximum length of the longest allowable
pathname on the filesystem which holds \fI/var/foo\fR.
.Sp
.Vb 2
\& $fd = POSIX::open( "/var/foo", &POSIX::O_RDONLY );
\& $path_max = POSIX::fpathconf($fd, &POSIX::_PC_PATH_MAX);
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """fpclassify""" 8
.el .IP \f(CWfpclassify\fR 8
.IX Item "fpclassify"
Returns one of
.Sp
.Vb 1
\& FP_NORMAL FP_ZERO FP_SUBNORMAL FP_INFINITE FP_NAN
.Ve
.Sp
telling the class of the argument [C99]. \f(CW\*(C`FP_INFINITE\*(C'\fR is positive
or negative infinity, \f(CW\*(C`FP_NAN\*(C'\fR is not-a-number. \f(CW\*(C`FP_SUBNORMAL\*(C'\fR
means subnormal numbers (also known as denormals), very small numbers
with low precision. \f(CW\*(C`FP_ZERO\*(C'\fR is zero. \f(CW\*(C`FP_NORMAL\*(C'\fR is all the rest.
Added in Perl v5.22.
.ie n .IP """fprintf""" 8
.el .IP \f(CWfprintf\fR 8
.IX Item "fprintf"
Not implemented. \f(CWfprintf()\fR is C\-specific, see "printf" in perlfunc instead.
.ie n .IP """fputc""" 8
.el .IP \f(CWfputc\fR 8
.IX Item "fputc"
Not implemented. \f(CWfputc()\fR is C\-specific, see "print" in perlfunc instead.
.ie n .IP """fputs""" 8
.el .IP \f(CWfputs\fR 8
.IX Item "fputs"
Not implemented. \f(CWfputs()\fR is C\-specific, see "print" in perlfunc instead.
.ie n .IP """fread""" 8
.el .IP \f(CWfread\fR 8
.IX Item "fread"
Not implemented. \f(CWfread()\fR is C\-specific, see "read" in perlfunc instead.
.ie n .IP """free""" 8
.el .IP \f(CWfree\fR 8
.IX Item "free"
Not implemented. \f(CWfree()\fR is C\-specific. Perl does memory management transparently.
.ie n .IP """freopen""" 8
.el .IP \f(CWfreopen\fR 8
.IX Item "freopen"
Not implemented. \f(CWfreopen()\fR is C\-specific, see "open" in perlfunc instead.
.ie n .IP """frexp""" 8
.el .IP \f(CWfrexp\fR 8
.IX Item "frexp"
Return the mantissa and exponent of a floating-point number.
.Sp
.Vb 1
\& ($mantissa, $exponent) = POSIX::frexp( 1.234e56 );
.Ve
.ie n .IP """fscanf""" 8
.el .IP \f(CWfscanf\fR 8
.IX Item "fscanf"
Not implemented. \f(CWfscanf()\fR is C\-specific, use <> and regular expressions instead.
.ie n .IP """fseek""" 8
.el .IP \f(CWfseek\fR 8
.IX Item "fseek"
Not implemented. Use method \f(CWIO::Seekable::seek()\fR instead, or see "seek" in perlfunc.
.ie n .IP """fsetpos""" 8
.el .IP \f(CWfsetpos\fR 8
.IX Item "fsetpos"
Not implemented. Use method \f(CWIO::Seekable::setpos()\fR instead, or seek "seek" in perlfunc.
.ie n .IP """fstat""" 8
.el .IP \f(CWfstat\fR 8
.IX Item "fstat"
Get file status. This uses file descriptors such as those obtained by
calling \f(CW\*(C`POSIX::open\*(C'\fR. The data returned is identical to the data from
Perl's builtin \f(CW\*(C`stat\*(C'\fR function.
.Sp
.Vb 2
\& $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
\& @stats = POSIX::fstat( $fd );
.Ve
.ie n .IP """fsync""" 8
.el .IP \f(CWfsync\fR 8
.IX Item "fsync"
Not implemented. Use method \f(CWIO::Handle::sync()\fR instead.
.ie n .IP """ftell""" 8
.el .IP \f(CWftell\fR 8
.IX Item "ftell"
Not implemented. Use method \f(CWIO::Seekable::tell()\fR instead, or see "tell" in perlfunc.
.ie n .IP """fwrite""" 8
.el .IP \f(CWfwrite\fR 8
.IX Item "fwrite"
Not implemented. \f(CWfwrite()\fR is C\-specific, see "print" in perlfunc instead.
.ie n .IP """getc""" 8
.el .IP \f(CWgetc\fR 8
.IX Item "getc"
This is identical to Perl's builtin \f(CWgetc()\fR function,
see "getc" in perlfunc.
.ie n .IP """getchar""" 8
.el .IP \f(CWgetchar\fR 8
.IX Item "getchar"
Returns one character from STDIN. Identical to Perl's \f(CWgetc()\fR,
see "getc" in perlfunc.
.ie n .IP """getcwd""" 8
.el .IP \f(CWgetcwd\fR 8
.IX Item "getcwd"
Returns the name of the current working directory.
See also Cwd.
.ie n .IP """getegid""" 8
.el .IP \f(CWgetegid\fR 8
.IX Item "getegid"
Returns the effective group identifier. Similar to Perl' s builtin
variable \f(CW$(\fR, see "$EGID" in perlvar.
.ie n .IP """getenv""" 8
.el .IP \f(CWgetenv\fR 8
.IX Item "getenv"
Returns the value of the specified environment variable.
The same information is available through the \f(CW%ENV\fR array.
.ie n .IP """geteuid""" 8
.el .IP \f(CWgeteuid\fR 8
.IX Item "geteuid"
Returns the effective user identifier. Identical to Perl's builtin \f(CW$>\fR
variable, see "$EUID" in perlvar.
.ie n .IP """getgid""" 8
.el .IP \f(CWgetgid\fR 8
.IX Item "getgid"
Returns the user's real group identifier. Similar to Perl's builtin
variable \f(CW$)\fR, see "$GID" in perlvar.
.ie n .IP """getgrgid""" 8
.el .IP \f(CWgetgrgid\fR 8
.IX Item "getgrgid"
This is identical to Perl's builtin \f(CWgetgrgid()\fR function for
returning group entries by group identifiers, see
"getgrgid" in perlfunc.
.ie n .IP """getgrnam""" 8
.el .IP \f(CWgetgrnam\fR 8
.IX Item "getgrnam"
This is identical to Perl's builtin \f(CWgetgrnam()\fR function for
returning group entries by group names, see "getgrnam" in perlfunc.
.ie n .IP """getgroups""" 8
.el .IP \f(CWgetgroups\fR 8
.IX Item "getgroups"
Returns the ids of the user's supplementary groups. Similar to Perl's
builtin variable \f(CW$)\fR, see "$GID" in perlvar.
.ie n .IP """getlogin""" 8
.el .IP \f(CWgetlogin\fR 8
.IX Item "getlogin"
This is identical to Perl's builtin \f(CWgetlogin()\fR function for
returning the user name associated with the current session, see
"getlogin" in perlfunc.
.ie n .IP """getpayload""" 8
.el .IP \f(CWgetpayload\fR 8
.IX Item "getpayload"
.Vb 2
\& use POSIX \*(Aq:nan_payload\*(Aq;
\& getpayload($var)
.Ve
.Sp
Returns the \f(CW\*(C`NaN\*(C'\fR payload. Added in Perl v5.24.
.Sp
Note the API instability warning in "setpayload".
.Sp
See "nan" for more discussion about \f(CW\*(C`NaN\*(C'\fR.
.ie n .IP """getpgrp""" 8
.el .IP \f(CWgetpgrp\fR 8
.IX Item "getpgrp"
This is identical to Perl's builtin \f(CWgetpgrp()\fR function for
returning the process group identifier of the current process, see
"getpgrp" in perlfunc.
.ie n .IP """getpid""" 8
.el .IP \f(CWgetpid\fR 8
.IX Item "getpid"
Returns the process identifier. Identical to Perl's builtin
variable \f(CW$$\fR, see "$PID" in perlvar.
.ie n .IP """getppid""" 8
.el .IP \f(CWgetppid\fR 8
.IX Item "getppid"
This is identical to Perl's builtin \f(CWgetppid()\fR function for
returning the process identifier of the parent process of the current
process , see "getppid" in perlfunc.
.ie n .IP """getpwnam""" 8
.el .IP \f(CWgetpwnam\fR 8
.IX Item "getpwnam"
This is identical to Perl's builtin \f(CWgetpwnam()\fR function for
returning user entries by user names, see "getpwnam" in perlfunc.
.ie n .IP """getpwuid""" 8
.el .IP \f(CWgetpwuid\fR 8
.IX Item "getpwuid"
This is identical to Perl's builtin \f(CWgetpwuid()\fR function for
returning user entries by user identifiers, see "getpwuid" in perlfunc.
.ie n .IP """gets""" 8
.el .IP \f(CWgets\fR 8
.IX Item "gets"
Returns one line from \f(CW\*(C`STDIN\*(C'\fR, similar to <>, also known
as the \f(CWreadline()\fR function, see "readline" in perlfunc.
.Sp
\&\fBNOTE\fR: if you have C programs that still use \f(CWgets()\fR, be very
afraid. The \f(CWgets()\fR function is a source of endless grief because
it has no buffer overrun checks. It should \fBnever\fR be used. The
\&\f(CWfgets()\fR function should be preferred instead.
.ie n .IP """getuid""" 8
.el .IP \f(CWgetuid\fR 8
.IX Item "getuid"
Returns the user's identifier. Identical to Perl's builtin \f(CW$<\fR variable,
see "$UID" in perlvar.
.ie n .IP """gmtime""" 8
.el .IP \f(CWgmtime\fR 8
.IX Item "gmtime"
This is identical to Perl's builtin \f(CWgmtime()\fR function for
converting seconds since the epoch to a date in Greenwich Mean Time,
see "gmtime" in perlfunc.
.ie n .IP """hypot""" 8
.el .IP \f(CWhypot\fR 8
.IX Item "hypot"
Equivalent to \f(CWsqrt(x\ *\ x\ +\ y\ *\ y)\fR except more stable on very large
or very small arguments [C99]. Added in Perl v5.22.
.ie n .IP """ilogb""" 8
.el .IP \f(CWilogb\fR 8
.IX Item "ilogb"
Integer binary logarithm [C99]. Added in Perl v5.22.
.Sp
For example \f(CWilogb(20)\fR is 4, as an integer.
.Sp
See also "logb".
.ie n .IP """Inf""" 8
.el .IP \f(CWInf\fR 8
.IX Item "Inf"
The infinity as a constant:
.Sp
.Vb 3
\& use POSIX qw(Inf);
\& my $pos_inf = +Inf; # Or just Inf.
\& my $neg_inf = \-Inf;
.Ve
.Sp
See also "isinf", and "fpclassify".
.ie n .IP """isalnum""" 8
.el .IP \f(CWisalnum\fR 8
.IX Item "isalnum"
This function has been removed as of Perl v5.24. It was very similar to
matching against \f(CW\*(C`qr/\ ^\ [[:alnum:]]+\ $\ /x\*(C'\fR, which you should convert
to use instead. See "POSIX Character Classes" in perlrecharclass.
.ie n .IP """isalpha""" 8
.el .IP \f(CWisalpha\fR 8
.IX Item "isalpha"
This function has been removed as of Perl v5.24. It was very similar to
matching against \f(CW\*(C`qr/\ ^\ [[:alpha:]]+\ $\ /x\*(C'\fR, which you should convert
to use instead. See "POSIX Character Classes" in perlrecharclass.
.ie n .IP """isatty""" 8
.el .IP \f(CWisatty\fR 8
.IX Item "isatty"
Returns a boolean indicating whether the specified filehandle is connected
to a tty. Similar to the \f(CW\*(C`\-t\*(C'\fR operator, see "\-X" in perlfunc.
.ie n .IP """iscntrl""" 8
.el .IP \f(CWiscntrl\fR 8
.IX Item "iscntrl"
This function has been removed as of Perl v5.24. It was very similar to
matching against \f(CW\*(C`qr/\ ^\ [[:cntrl:]]+\ $\ /x\*(C'\fR, which you should convert
to use instead. See "POSIX Character Classes" in perlrecharclass.
.ie n .IP """isdigit""" 8
.el .IP \f(CWisdigit\fR 8
.IX Item "isdigit"
This function has been removed as of Perl v5.24. It was very similar to
matching against \f(CW\*(C`qr/\ ^\ [[:digit:]]+\ $\ /x\*(C'\fR, which you should convert
to use instead. See "POSIX Character Classes" in perlrecharclass.
.ie n .IP """isfinite""" 8
.el .IP \f(CWisfinite\fR 8
.IX Item "isfinite"
Returns true if the argument is a finite number (that is, not an
infinity, or the not-a-number) [C99]. Added in Perl v5.22.
.Sp
See also "isinf", "isnan", and "fpclassify".
.ie n .IP """isgraph""" 8
.el .IP \f(CWisgraph\fR 8
.IX Item "isgraph"
This function has been removed as of Perl v5.24. It was very similar to
matching against \f(CW\*(C`qr/\ ^\ [[:graph:]]+\ $\ /x\*(C'\fR, which you should convert
to use instead. See "POSIX Character Classes" in perlrecharclass.
.ie n .IP """isgreater""" 8
.el .IP \f(CWisgreater\fR 8
.IX Item "isgreater"
(Also \f(CW\*(C`isgreaterequal\*(C'\fR, \f(CW\*(C`isless\*(C'\fR, \f(CW\*(C`islessequal\*(C'\fR, \f(CW\*(C`islessgreater\*(C'\fR,
\&\f(CW\*(C`isunordered\*(C'\fR)
.Sp
Floating point comparisons which handle the \f(CW\*(C`NaN\*(C'\fR [C99]. Added in Perl
v5.22.
.ie n .IP """isinf""" 8
.el .IP \f(CWisinf\fR 8
.IX Item "isinf"
Returns true if the argument is an infinity (positive or negative) [C99].
Added in Perl v5.22.
.Sp
See also "Inf", "isnan", "isfinite", and "fpclassify".
.ie n .IP """islower""" 8
.el .IP \f(CWislower\fR 8
.IX Item "islower"
This function has been removed as of Perl v5.24. It was very similar to
matching against \f(CW\*(C`qr/\ ^\ [[:lower:]]+\ $\ /x\*(C'\fR, which you should convert
to use instead. See "POSIX Character Classes" in perlrecharclass.
.ie n .IP """isnan""" 8
.el .IP \f(CWisnan\fR 8
.IX Item "isnan"
Returns true if the argument is \f(CW\*(C`NaN\*(C'\fR (not-a-number) [C99]. Added in
Perl v5.22.
.Sp
Note that you can also test for "\f(CW\*(C`NaN\*(C'\fR\-ness" with
equality operators (\f(CW\*(C`==\*(C'\fR or \f(CW\*(C`!=\*(C'\fR), as in
.Sp
.Vb 1
\& print "x is not a NaN\en" if $x == $x;
.Ve
.Sp
since the \f(CW\*(C`NaN\*(C'\fR is not equal to anything, \fBincluding itself\fR.
.Sp
See also "nan", "NaN", "isinf", and "fpclassify".
.ie n .IP """isnormal""" 8
.el .IP \f(CWisnormal\fR 8
.IX Item "isnormal"
Returns true if the argument is normal (that is, not a subnormal/denormal,
and not an infinity, or a not-a-number) [C99]. Added in Perl v5.22.
.Sp
See also "isfinite", and "fpclassify".
.ie n .IP """isprint""" 8
.el .IP \f(CWisprint\fR 8
.IX Item "isprint"
This function has been removed as of Perl v5.24. It was very similar to
matching against \f(CW\*(C`qr/\ ^\ [[:print:]]+\ $\ /x\*(C'\fR, which you should convert
to use instead. See "POSIX Character Classes" in perlrecharclass.
.ie n .IP """ispunct""" 8
.el .IP \f(CWispunct\fR 8
.IX Item "ispunct"
This function has been removed as of Perl v5.24. It was very similar to
matching against \f(CW\*(C`qr/\ ^\ [[:punct:]]+\ $\ /x\*(C'\fR, which you should convert
to use instead. See "POSIX Character Classes" in perlrecharclass.
.ie n .IP """issignaling""" 8
.el .IP \f(CWissignaling\fR 8
.IX Item "issignaling"
.Vb 2
\& use POSIX \*(Aq:nan_payload\*(Aq;
\& issignaling($var, $payload)
.Ve
.Sp
Return true if the argument is a \fIsignaling\fR NaN. Added in Perl v5.24.
.Sp
Note the API instability warning in "setpayload".
.Sp
See "nan" for more discussion about \f(CW\*(C`NaN\*(C'\fR.
.ie n .IP """isspace""" 8
.el .IP \f(CWisspace\fR 8
.IX Item "isspace"
This function has been removed as of Perl v5.24. It was very similar to
matching against \f(CW\*(C`qr/\ ^\ [[:space:]]+\ $\ /x\*(C'\fR, which you should convert
to use instead. See "POSIX Character Classes" in perlrecharclass.
.ie n .IP """isupper""" 8
.el .IP \f(CWisupper\fR 8
.IX Item "isupper"
This function has been removed as of Perl v5.24. It was very similar to
matching against \f(CW\*(C`qr/\ ^\ [[:upper:]]+\ $\ /x\*(C'\fR, which you should convert
to use instead. See "POSIX Character Classes" in perlrecharclass.
.ie n .IP """isxdigit""" 8
.el .IP \f(CWisxdigit\fR 8
.IX Item "isxdigit"
This function has been removed as of Perl v5.24. It was very similar to
matching against \f(CW\*(C`qr/\ ^\ [[:xdigit:]]+\ $\ /x\*(C'\fR, which you should
convert to use instead. See "POSIX Character Classes" in perlrecharclass.
.ie n .IP """j0""" 8
.el .IP \f(CWj0\fR 8
.IX Item "j0"
.PD 0
.ie n .IP """j1""" 8
.el .IP \f(CWj1\fR 8
.IX Item "j1"
.ie n .IP """jn""" 8
.el .IP \f(CWjn\fR 8
.IX Item "jn"
.ie n .IP """y0""" 8
.el .IP \f(CWy0\fR 8
.IX Item "y0"
.ie n .IP """y1""" 8
.el .IP \f(CWy1\fR 8
.IX Item "y1"
.ie n .IP """yn""" 8
.el .IP \f(CWyn\fR 8
.IX Item "yn"
.PD
The Bessel function of the first kind of the order zero.
.ie n .IP """kill""" 8
.el .IP \f(CWkill\fR 8
.IX Item "kill"
This is identical to Perl's builtin \f(CWkill()\fR function for sending
signals to processes (often to terminate them), see "kill" in perlfunc.
.ie n .IP """labs""" 8
.el .IP \f(CWlabs\fR 8
.IX Item "labs"
Not implemented. (For returning absolute values of long integers.)
\&\f(CWlabs()\fR is C\-specific, see "abs" in perlfunc instead.
.ie n .IP """lchown""" 8
.el .IP \f(CWlchown\fR 8
.IX Item "lchown"
This is identical to the C function, except the order of arguments is
consistent with Perl's builtin \f(CWchown()\fR with the added restriction
of only one path, not a list of paths. Does the same thing as the
\&\f(CWchown()\fR function but changes the owner of a symbolic link instead
of the file the symbolic link points to.
.Sp
.Vb 1
\& POSIX::lchown($uid, $gid, $file_path);
.Ve
.ie n .IP """ldexp""" 8
.el .IP \f(CWldexp\fR 8
.IX Item "ldexp"
This is identical to the C function \f(CWldexp()\fR
for multiplying floating point numbers with powers of two.
.Sp
.Vb 1
\& $x_quadrupled = POSIX::ldexp($x, 2);
.Ve
.ie n .IP """ldiv""" 8
.el .IP \f(CWldiv\fR 8
.IX Item "ldiv"
Not implemented. (For computing dividends of long integers.)
\&\f(CWldiv()\fR is C\-specific, use \f(CW\*(C`/\*(C'\fR and \f(CWint()\fR instead.
.ie n .IP """lgamma""" 8
.el .IP \f(CWlgamma\fR 8
.IX Item "lgamma"
The logarithm of the Gamma function [C99]. Added in Perl v5.22.
.Sp
See also "tgamma".
.ie n .IP """log1p""" 8
.el .IP \f(CWlog1p\fR 8
.IX Item "log1p"
Equivalent to \f(CW\*(C`log(1\ +\ x)\*(C'\fR, but more stable results for small argument
values [C99]. Added in Perl v5.22.
.ie n .IP """log2""" 8
.el .IP \f(CWlog2\fR 8
.IX Item "log2"
Logarithm base two [C99]. Added in Perl v5.22.
.Sp
See also "expm1".
.ie n .IP """logb""" 8
.el .IP \f(CWlogb\fR 8
.IX Item "logb"
Integer binary logarithm [C99]. Added in Perl v5.22.
.Sp
For example \f(CWlogb(20)\fR is 4, as a floating point number.
.Sp
See also "ilogb".
.ie n .IP """link""" 8
.el .IP \f(CWlink\fR 8
.IX Item "link"
This is identical to Perl's builtin \f(CWlink()\fR function
for creating hard links into files, see "link" in perlfunc.
.ie n .IP """localeconv""" 8
.el .IP \f(CWlocaleconv\fR 8
.IX Item "localeconv"
Get numeric formatting information. Returns a reference to a hash
containing the formatting values of the locale that currently underlies
the program, regardless of whether or not it is called from within the
scope of a \f(CW\*(C`use\ locale\*(C'\fR. Users of this function should also read
perllocale, which provides a comprehensive discussion of Perl locale
handling, including
a section devoted to this function.
Prior to Perl 5.28, or when operating in a non thread-safe environment,
it should not be used in a threaded application unless it's certain that
the underlying locale is C or POSIX. This is because it otherwise
changes the locale, which globally affects all threads simultaneously.
Windows platforms starting with Visual Studio 2005 are mostly
thread-safe, but use of this function in those prior to Visual Studio
2015 can have a race with a thread that has called
"switch_to_global_locale" in perlapi.
.Sp
Here is how to query the database for the \fBde\fR (Deutsch or German) locale.
.Sp
.Vb 10
\& my $loc = POSIX::setlocale( &POSIX::LC_ALL, "de" );
\& print "Locale: \e"$loc\e"\en";
\& my $lconv = POSIX::localeconv();
\& foreach my $property (qw(
\& decimal_point
\& thousands_sep
\& grouping
\& int_curr_symbol
\& currency_symbol
\& mon_decimal_point
\& mon_thousands_sep
\& mon_grouping
\& positive_sign
\& negative_sign
\& int_frac_digits
\& frac_digits
\& p_cs_precedes
\& p_sep_by_space
\& n_cs_precedes
\& n_sep_by_space
\& p_sign_posn
\& n_sign_posn
\& int_p_cs_precedes
\& int_p_sep_by_space
\& int_n_cs_precedes
\& int_n_sep_by_space
\& int_p_sign_posn
\& int_n_sign_posn
\& ))
\& {
\& printf qq(%s: "%s",\en),
\& $property, $lconv\->{$property};
\& }
.Ve
.Sp
The members whose names begin with \f(CW\*(C`int_p_\*(C'\fR and \f(CW\*(C`int_n_\*(C'\fR were added by
POSIX.1\-2008 and are only available on systems that support them.
.Sp
A value of \-1 returned for numeric entries indicates that the field is
not applicable to the locale. This is rare except in the C and related
locales, which don't have most monetary values defined. It can also
happen, quirkily, in fields that are otherwise boolean to indicate that
the value is kind of neither true nor false. This happens in \f(CW\*(C`p_cs_precedes\*(C'\fR
and \f(CW\*(C`int_p_cs_precedes\*(C'\fR when the currency symbol neither precedes nor
succeeds a positive value but is infixed, by replacing the radix
character.
.Sp
Prior to Perl v5.37.7, empty string fields and numeric fields with value
\&\-1 were omittted from the returned hash.
.ie n .IP """localtime""" 8
.el .IP \f(CWlocaltime\fR 8
.IX Item "localtime"
This is identical to Perl's builtin \f(CWlocaltime()\fR function for
converting seconds since the epoch to a date see "localtime" in perlfunc except
that \f(CWPOSIX::localtime()\fR must be provided an explicit value (rather than
relying on an implicit \f(CW$_\fR):
.Sp
.Vb 1
\& @localtime = POSIX::localtime(time); # good
\&
\& @localtime = localtime(); # good
\&
\& @localtime = POSIX::localtime(); # throws exception
.Ve
.ie n .IP """log""" 8
.el .IP \f(CWlog\fR 8
.IX Item "log"
This is identical to Perl's builtin \f(CWlog()\fR function,
returning the natural (\fIe\fR\-based) logarithm of the numerical argument,
see "log" in perlfunc.
.ie n .IP """log10""" 8
.el .IP \f(CWlog10\fR 8
.IX Item "log10"
This is identical to the C function \f(CWlog10()\fR,
returning the 10\-base logarithm of the numerical argument.
You can also use
.Sp
.Vb 1
\& sub log10 { log($_[0]) / log(10) }
.Ve
.Sp
or
.Sp
.Vb 1
\& sub log10 { log($_[0]) / 2.30258509299405 }
.Ve
.Sp
or
.Sp
.Vb 1
\& sub log10 { log($_[0]) * 0.434294481903252 }
.Ve
.ie n .IP """longjmp""" 8
.el .IP \f(CWlongjmp\fR 8
.IX Item "longjmp"
Not implemented. \f(CWlongjmp()\fR is C\-specific: use "die" in perlfunc instead.
.ie n .IP """lseek""" 8
.el .IP \f(CWlseek\fR 8
.IX Item "lseek"
Move the file's read/write position. This uses file descriptors such as
those obtained by calling \f(CW\*(C`POSIX::open\*(C'\fR.
.Sp
.Vb 2
\& $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
\& $off_t = POSIX::lseek( $fd, 0, &POSIX::SEEK_SET );
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """lrint""" 8
.el .IP \f(CWlrint\fR 8
.IX Item "lrint"
Depending on the current floating point rounding mode, rounds the
argument either toward nearest (like "round"), toward zero (like
"trunc"), downward (toward negative infinity), or upward (toward
positive infinity) [C99]. Added in Perl v5.22.
.Sp
For the rounding mode, see "fegetround".
.ie n .IP """lround""" 8
.el .IP \f(CWlround\fR 8
.IX Item "lround"
Like "round", but as integer, as opposed to floating point [C99]. Added
in Perl v5.22.
.Sp
See also "ceil", "floor", "trunc".
.Sp
Owing to an oversight, this is not currently exported by default, or as part of
the \f(CW\*(C`:math_h_c99\*(C'\fR export tag; importing it must therefore be done by explicit
name.
.ie n .IP """malloc""" 8
.el .IP \f(CWmalloc\fR 8
.IX Item "malloc"
Not implemented. \f(CWmalloc()\fR is C\-specific. Perl does memory management transparently.
.ie n .IP """mblen""" 8
.el .IP \f(CWmblen\fR 8
.IX Item "mblen"
This is the same as the C function \f(CWmblen()\fR on unthreaded perls. On
threaded perls, it transparently (almost) substitutes the more
thread-safe \f(CW\*(C`mbrlen\*(C'\fR(3), if available, instead of \f(CW\*(C`mblen\*(C'\fR.
.Sp
Core Perl does not have any support for wide and multibyte locales,
except Unicode UTF\-8 locales. This function, in conjunction with
"mbtowc" and "wctomb" may be used to roll your own decoding/encoding
of other types of multi-byte locales.
.Sp
Use \f(CW\*(C`undef\*(C'\fR as the first parameter to this function to get the effect
of passing NULL as the first parameter to \f(CW\*(C`mblen\*(C'\fR. This resets any
shift state to its initial value. The return value is undefined if
\&\f(CW\*(C`mbrlen\*(C'\fR was substituted, so you should never rely on it.
.Sp
When the first parameter is a scalar containing a value that either is a
PV string or can be forced into one, the return value is the number of
bytes occupied by the first character of that string; or 0 if that first
character is the wide NUL character; or negative if there is an error.
This is based on the locale that currently underlies the program,
regardless of whether or not the function is called from Perl code that
is within the scope of \f(CW\*(C`use\ locale\*(C'\fR. Perl makes no attempt at
hiding from your code any differences in the \f(CW\*(C`errno\*(C'\fR setting between
\&\f(CW\*(C`mblen\*(C'\fR and \f(CW\*(C`mbrlen\*(C'\fR. It does set \f(CW\*(C`errno\*(C'\fR to 0 before calling them.
.Sp
The optional second parameter is ignored if it is larger than the
actual length of the first parameter string.
.ie n .IP """mbtowc""" 8
.el .IP \f(CWmbtowc\fR 8
.IX Item "mbtowc"
This is the same as the C function \f(CWmbtowc()\fR on unthreaded perls. On
threaded perls, it transparently (almost) substitutes the more
thread-safe \f(CW\*(C`mbrtowc\*(C'\fR(3), if available, instead of \f(CW\*(C`mbtowc\*(C'\fR.
.Sp
Core Perl does not have any support for wide and multibyte locales,
except Unicode UTF\-8 locales. This function, in conjunction with
"mblen" and "wctomb" may be used to roll your own decoding/encoding
of other types of multi-byte locales.
.Sp
The first parameter is a scalar into which, upon success, the wide
character represented by the multi-byte string contained in the second
parameter is stored. The optional third parameter is ignored if it is
larger than the actual length of the second parameter string.
.Sp
Use \f(CW\*(C`undef\*(C'\fR as the second parameter to this function to get the effect
of passing NULL as the second parameter to \f(CW\*(C`mbtowc\*(C'\fR. This ignores the
first parameter, and resets any shift state to its initial value. The
return value is undefined if \f(CW\*(C`mbrtowc\*(C'\fR was substituted, so you should
never rely on it.
.Sp
When the second parameter is a scalar containing a value that either is
a PV string or can be forced into one, the return value is the number of
bytes occupied by the first character of that string; or 0 if that first
character is the wide NUL character; or negative if there is an error.
This is based on the locale that currently underlies the program,
regardless of whether or not the function is called from Perl code that
is within the scope of \f(CW\*(C`use\ locale\*(C'\fR. Perl makes no attempt at
hiding from your code any differences in the \f(CW\*(C`errno\*(C'\fR setting between
\&\f(CW\*(C`mbtowc\*(C'\fR and \f(CW\*(C`mbrtowc\*(C'\fR. It does set \f(CW\*(C`errno\*(C'\fR to 0 before calling
them.
.ie n .IP """memchr""" 8
.el .IP \f(CWmemchr\fR 8
.IX Item "memchr"
Not implemented. \f(CWmemchr()\fR is C\-specific, see "index" in perlfunc instead.
.ie n .IP """memcmp""" 8
.el .IP \f(CWmemcmp\fR 8
.IX Item "memcmp"
Not implemented. \f(CWmemcmp()\fR is C\-specific, use \f(CW\*(C`eq\*(C'\fR instead, see perlop.
.ie n .IP """memcpy""" 8
.el .IP \f(CWmemcpy\fR 8
.IX Item "memcpy"
Not implemented. \f(CWmemcpy()\fR is C\-specific, use \f(CW\*(C`=\*(C'\fR, see perlop, or see "substr" in perlfunc.
.ie n .IP """memmove""" 8
.el .IP \f(CWmemmove\fR 8
.IX Item "memmove"
Not implemented. \f(CWmemmove()\fR is C\-specific, use \f(CW\*(C`=\*(C'\fR, see perlop, or see "substr" in perlfunc.
.ie n .IP """memset""" 8
.el .IP \f(CWmemset\fR 8
.IX Item "memset"
Not implemented. \f(CWmemset()\fR is C\-specific, use \f(CW\*(C`x\*(C'\fR instead, see perlop.
.ie n .IP """mkdir""" 8
.el .IP \f(CWmkdir\fR 8
.IX Item "mkdir"
This is identical to Perl's builtin \f(CWmkdir()\fR function
for creating directories, see "mkdir" in perlfunc.
.ie n .IP """mkfifo""" 8
.el .IP \f(CWmkfifo\fR 8
.IX Item "mkfifo"
This is similar to the C function \f(CWmkfifo()\fR for creating
FIFO special files.
.Sp
.Vb 1
\& if (mkfifo($path, $mode)) { ....
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure. The \f(CW$mode\fR is similar to the
mode of \f(CWmkdir()\fR, see "mkdir" in perlfunc, though for \f(CW\*(C`mkfifo\*(C'\fR
you \fBmust\fR specify the \f(CW$mode\fR.
.ie n .IP """mktime""" 8
.el .IP \f(CWmktime\fR 8
.IX Item "mktime"
Convert date/time info to a calendar time.
.Sp
Synopsis:
.Sp
.Vb 2
\& mktime(sec, min, hour, mday, mon, year, wday = 0,
\& yday = 0, isdst = \-1)
.Ve
.Sp
The month (\f(CW\*(C`mon\*(C'\fR), weekday (\f(CW\*(C`wday\*(C'\fR), and yearday (\f(CW\*(C`yday\*(C'\fR) begin at zero,
\&\fIi.e.\fR, January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1. The
year (\f(CW\*(C`year\*(C'\fR) is given in years since 1900; \fIi.e.\fR, the year 1995 is 95; the
year 2001 is 101. Consult your system's \f(CWmktime()\fR manpage for details
about these and the other arguments.
.Sp
Calendar time for December 12, 1995, at 10:30 am.
.Sp
.Vb 2
\& $time_t = POSIX::mktime( 0, 30, 10, 12, 11, 95 );
\& print "Date = ", POSIX::ctime($time_t);
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """modf""" 8
.el .IP \f(CWmodf\fR 8
.IX Item "modf"
Return the integral and fractional parts of a floating-point number.
.Sp
.Vb 1
\& ($fractional, $integral) = POSIX::modf( 3.14 );
.Ve
.Sp
See also "round".
.ie n .IP """NaN""" 8
.el .IP \f(CWNaN\fR 8
.IX Item "NaN"
The not-a-number as a constant:
.Sp
.Vb 2
\& use POSIX qw(NaN);
\& my $nan = NaN;
.Ve
.Sp
See also "nan", \f(CW\*(C`/isnan\*(C'\fR, and "fpclassify".
.ie n .IP """nan""" 8
.el .IP \f(CWnan\fR 8
.IX Item "nan"
.Vb 1
\& my $nan = nan();
.Ve
.Sp
Returns \f(CW\*(C`NaN\*(C'\fR, not-a-number [C99]. Added in Perl v5.22.
.Sp
The returned NaN is always a \fIquiet\fR NaN, as opposed to \fIsignaling\fR.
.Sp
With an argument, can be used to generate a NaN with \fIpayload\fR.
The argument is first interpreted as a floating point number,
but then any fractional parts are truncated (towards zero),
and the value is interpreted as an unsigned integer.
The bits of this integer are stored in the unused bits of the NaN.
.Sp
The result has a dual nature: it is a NaN, but it also carries
the integer inside it. The integer can be retrieved with "getpayload".
Note, though, that the payload is not propagated, not even on copies,
and definitely not in arithmetic operations.
.Sp
How many bits fit in the NaN depends on what kind of floating points
are being used, but on the most common platforms (64\-bit IEEE 754,
or the x86 80\-bit long doubles) there are 51 and 61 bits available,
respectively. (There would be 52 and 62, but the quiet/signaling
bit of NaNs takes away one.) However, because of the floating\-point\-to\-
integer-and-back conversions, please test carefully whether you get back
what you put in. If your integers are only 32 bits wide, you probably
should not rely on more than 32 bits of payload.
.Sp
Whether a "signaling" NaN is in any way different from a "quiet" NaN,
depends on the platform. Also note that the payload of the default
NaN (no argument to \fBnan()\fR) is not necessarily zero, use \f(CW\*(C`setpayload\*(C'\fR
to explicitly set the payload. On some platforms like the 32\-bit x86,
(unless using the 80\-bit long doubles) the signaling bit is not supported
at all.
.Sp
See also "isnan", "NaN", "setpayload" and "issignaling".
.ie n .IP """nearbyint""" 8
.el .IP \f(CWnearbyint\fR 8
.IX Item "nearbyint"
Returns the nearest integer to the argument, according to the current
rounding mode (see "fegetround") [C99]. Added in Perl v5.22.
.ie n .IP """nextafter""" 8
.el .IP \f(CWnextafter\fR 8
.IX Item "nextafter"
Returns the next representable floating point number after \f(CW\*(C`x\*(C'\fR in the
direction of \f(CW\*(C`y\*(C'\fR [C99]. Added in Perl v5.22.
.Sp
.Vb 1
\& my $nextafter = POSIX::nextafter($x, $y);
.Ve
.Sp
Like "nexttoward", but potentially less accurate.
.ie n .IP """nexttoward""" 8
.el .IP \f(CWnexttoward\fR 8
.IX Item "nexttoward"
Returns the next representable floating point number after \f(CW\*(C`x\*(C'\fR in the
direction of \f(CW\*(C`y\*(C'\fR [C99]. Added in Perl v5.22.
.Sp
.Vb 1
\& my $nexttoward = POSIX::nexttoward($x, $y);
.Ve
.Sp
Like "nextafter", but potentially more accurate.
.ie n .IP """nice""" 8
.el .IP \f(CWnice\fR 8
.IX Item "nice"
This is similar to the C function \f(CWnice()\fR, for changing
the scheduling preference of the current process. Positive
arguments mean a more polite process, negative values a more
needy process. Normal (non-root) user processes can only change towards
being more polite.
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """offsetof""" 8
.el .IP \f(CWoffsetof\fR 8
.IX Item "offsetof"
Not implemented. \f(CWoffsetof()\fR is C\-specific, you probably want to see "pack" in perlfunc instead.
.ie n .IP """open""" 8
.el .IP \f(CWopen\fR 8
.IX Item "open"
Open a file for reading for writing. This returns file descriptors, not
Perl filehandles. Use \f(CW\*(C`POSIX::close\*(C'\fR to close the file.
.Sp
Open a file read-only with mode 0666.
.Sp
.Vb 1
\& $fd = POSIX::open( "foo" );
.Ve
.Sp
Open a file for read and write.
.Sp
.Vb 1
\& $fd = POSIX::open( "foo", &POSIX::O_RDWR );
.Ve
.Sp
Open a file for write, with truncation.
.Sp
.Vb 3
\& $fd = POSIX::open(
\& "foo", &POSIX::O_WRONLY | &POSIX::O_TRUNC
\& );
.Ve
.Sp
Create a new file with mode 0640. Set up the file for writing.
.Sp
.Vb 3
\& $fd = POSIX::open(
\& "foo", &POSIX::O_CREAT | &POSIX::O_WRONLY, 0640
\& );
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.Sp
See also "sysopen" in perlfunc.
.ie n .IP """opendir""" 8
.el .IP \f(CWopendir\fR 8
.IX Item "opendir"
Open a directory for reading.
.Sp
.Vb 3
\& $dir = POSIX::opendir( "/var" );
\& @files = POSIX::readdir( $dir );
\& POSIX::closedir( $dir );
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """pathconf""" 8
.el .IP \f(CWpathconf\fR 8
.IX Item "pathconf"
Retrieves the value of a configurable limit on a file or directory.
.Sp
The following will determine the maximum length of the longest allowable
pathname on the filesystem which holds \f(CW\*(C`/var\*(C'\fR.
.Sp
.Vb 2
\& $path_max = POSIX::pathconf( "/var",
\& &POSIX::_PC_PATH_MAX );
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """pause""" 8
.el .IP \f(CWpause\fR 8
.IX Item "pause"
This is similar to the C function \f(CWpause()\fR, which suspends
the execution of the current process until a signal is received.
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """perror""" 8
.el .IP \f(CWperror\fR 8
.IX Item "perror"
This is identical to the C function \f(CWperror()\fR, which outputs to the
standard error stream the specified message followed by \f(CW": "\fR and the
current error string. Use the \f(CWwarn()\fR function and the \f(CW$!\fR
variable instead, see "warn" in perlfunc and "$ERRNO" in perlvar.
.ie n .IP """pipe""" 8
.el .IP \f(CWpipe\fR 8
.IX Item "pipe"
Create an interprocess channel. This returns file descriptors like those
returned by \f(CW\*(C`POSIX::open\*(C'\fR.
.Sp
.Vb 3
\& my ($read, $write) = POSIX::pipe();
\& POSIX::write( $write, "hello", 5 );
\& POSIX::read( $read, $buf, 5 );
.Ve
.Sp
See also "pipe" in perlfunc.
.ie n .IP """pow""" 8
.el .IP \f(CWpow\fR 8
.IX Item "pow"
Computes \f(CW$x\fR raised to the power \f(CW$exponent\fR.
.Sp
.Vb 1
\& $ret = POSIX::pow( $x, $exponent );
.Ve
.Sp
You can also use the \f(CW\*(C`**\*(C'\fR operator, see perlop.
.ie n .IP """printf""" 8
.el .IP \f(CWprintf\fR 8
.IX Item "printf"
Formats and prints the specified arguments to \f(CW\*(C`STDOUT\*(C'\fR.
See also "printf" in perlfunc.
.ie n .IP """putc""" 8
.el .IP \f(CWputc\fR 8
.IX Item "putc"
Not implemented. \f(CWputc()\fR is C\-specific, see "print" in perlfunc instead.
.ie n .IP """putchar""" 8
.el .IP \f(CWputchar\fR 8
.IX Item "putchar"
Not implemented. \f(CWputchar()\fR is C\-specific, see "print" in perlfunc instead.
.ie n .IP """puts""" 8
.el .IP \f(CWputs\fR 8
.IX Item "puts"
Not implemented. \f(CWputs()\fR is C\-specific, see "print" in perlfunc instead.
.ie n .IP """qsort""" 8
.el .IP \f(CWqsort\fR 8
.IX Item "qsort"
Not implemented. \f(CWqsort()\fR is C\-specific, see "sort" in perlfunc instead.
.ie n .IP """raise""" 8
.el .IP \f(CWraise\fR 8
.IX Item "raise"
Sends the specified signal to the current process.
See also "kill" in perlfunc and the \f(CW$$\fR in "$PID" in perlvar.
.ie n .IP """rand""" 8
.el .IP \f(CWrand\fR 8
.IX Item "rand"
Not implemented. \f(CWrand()\fR is non-portable, see "rand" in perlfunc instead.
.ie n .IP """read""" 8
.el .IP \f(CWread\fR 8
.IX Item "read"
Read from a file. This uses file descriptors such as those obtained by
calling \f(CW\*(C`POSIX::open\*(C'\fR. If the buffer \f(CW$buf\fR is not large enough for the
read then Perl will extend it to make room for the request.
.Sp
.Vb 2
\& $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
\& $bytes = POSIX::read( $fd, $buf, 3 );
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.Sp
See also "sysread" in perlfunc.
.ie n .IP """readdir""" 8
.el .IP \f(CWreaddir\fR 8
.IX Item "readdir"
This is identical to Perl's builtin \f(CWreaddir()\fR function
for reading directory entries, see "readdir" in perlfunc.
.ie n .IP """realloc""" 8
.el .IP \f(CWrealloc\fR 8
.IX Item "realloc"
Not implemented. \f(CWrealloc()\fR is C\-specific. Perl does memory management transparently.
.ie n .IP """remainder""" 8
.el .IP \f(CWremainder\fR 8
.IX Item "remainder"
Given \f(CW\*(C`x\*(C'\fR and \f(CW\*(C`y\*(C'\fR, returns the value \f(CW\*(C`x\ \-\ n*y\*(C'\fR, where \f(CW\*(C`n\*(C'\fR is the integer
closest to \f(CW\*(C`x\*(C'\fR/\f(CW\*(C`y\*(C'\fR [C99]. Added in Perl v5.22.
.Sp
.Vb 1
\& my $remainder = POSIX::remainder($x, $y)
.Ve
.Sp
See also "remquo".
.ie n .IP """remove""" 8
.el .IP \f(CWremove\fR 8
.IX Item "remove"
Deletes a name from the filesystem. Calls "unlink" in perlfunc for
files and "rmdir" in perlfunc for directories.
.ie n .IP """remquo""" 8
.el .IP \f(CWremquo\fR 8
.IX Item "remquo"
Like "remainder" but also returns the low-order bits of the quotient (n)
[C99]. Added in Perl v5.22.
.Sp
(This is quite esoteric interface, mainly used to implement numerical
algorithms.)
.ie n .IP """rename""" 8
.el .IP \f(CWrename\fR 8
.IX Item "rename"
This is identical to Perl's builtin \f(CWrename()\fR function
for renaming files, see "rename" in perlfunc.
.ie n .IP """rewind""" 8
.el .IP \f(CWrewind\fR 8
.IX Item "rewind"
Seeks to the beginning of the file.
.ie n .IP """rewinddir""" 8
.el .IP \f(CWrewinddir\fR 8
.IX Item "rewinddir"
This is identical to Perl's builtin \f(CWrewinddir()\fR function for
rewinding directory entry streams, see "rewinddir" in perlfunc.
.ie n .IP """rint""" 8
.el .IP \f(CWrint\fR 8
.IX Item "rint"
Identical to "lrint".
.ie n .IP """rmdir""" 8
.el .IP \f(CWrmdir\fR 8
.IX Item "rmdir"
This is identical to Perl's builtin \f(CWrmdir()\fR function
for removing (empty) directories, see "rmdir" in perlfunc.
.ie n .IP """round""" 8
.el .IP \f(CWround\fR 8
.IX Item "round"
Returns the integer (but still as floating point) nearest to the
argument [C99]. Added in Perl v5.22.
.Sp
See also "ceil", "floor", "lround", "modf", and "trunc".
.ie n .IP """scalbn""" 8
.el .IP \f(CWscalbn\fR 8
.IX Item "scalbn"
Returns \f(CW\*(C`x\ *\ 2**y\*(C'\fR [C99]. Added in Perl v5.22.
.Sp
See also "frexp" and "ldexp".
.ie n .IP """scanf""" 8
.el .IP \f(CWscanf\fR 8
.IX Item "scanf"
Not implemented. \f(CWscanf()\fR is C\-specific, use <> and regular expressions instead,
see perlre.
.ie n .IP """setgid""" 8
.el .IP \f(CWsetgid\fR 8
.IX Item "setgid"
Sets the real group identifier and the effective group identifier for
this process. Similar to assigning a value to the Perl's builtin
\&\f(CW$)\fR variable, see "$EGID" in perlvar, except that the latter
will change only the real user identifier, and that the \fBsetgid()\fR
uses only a single numeric argument, as opposed to a space-separated
list of numbers.
.ie n .IP """setjmp""" 8
.el .IP \f(CWsetjmp\fR 8
.IX Item "setjmp"
Not implemented. \f(CWsetjmp()\fR is C\-specific: use \f(CW\*(C`eval {}\*(C'\fR instead,
see "eval" in perlfunc.
.ie n .IP """setlocale""" 8
.el .IP \f(CWsetlocale\fR 8
.IX Item "setlocale"
WARNING! Prior to Perl 5.28 or on a system that does not support
thread-safe locale operations, do NOT use this function in a
thread. The locale will change in all other threads at the
same time, and should your thread get paused by the operating system,
and another started, that thread will not have the locale it is
expecting. On some platforms, there can be a race leading to segfaults
if two threads call this function nearly simultaneously. This warning
does not apply on unthreaded builds, or on perls where
\&\f(CW\*(C`${^SAFE_LOCALES}\*(C'\fR exists and is non-zero; namely Perl 5.28 and later
compiled to be locale-thread-safe.
.Sp
This function
modifies and queries the program's underlying locale. Users of this
function should read perllocale, whch provides a comprehensive
discussion of Perl locale handling, knowledge of which is necessary to
properly use this function. It contains
a section devoted to this function.
The discussion here is merely a summary reference for \f(CWsetlocale()\fR.
Note that Perl itself is almost entirely unaffected by the locale
except within the scope of \f(CW"use\ locale"\fR. (Exceptions are listed
in "Not within the scope of "use locale"" in perllocale, and
locale-dependent functions within the POSIX module ARE always affected
by the current locale.)
.Sp
The following examples assume
.Sp
.Vb 1
\& use POSIX qw(setlocale LC_ALL LC_CTYPE);
.Ve
.Sp
has been issued.
.Sp
The following will set the traditional UNIX system locale behavior
(the second argument \f(CW"C"\fR).
.Sp
.Vb 1
\& $loc = setlocale( LC_ALL, "C" );
.Ve
.Sp
The following will query the current \f(CW\*(C`LC_CTYPE\*(C'\fR category. (No second
argument means 'query'.)
.Sp
.Vb 1
\& $loc = setlocale( LC_CTYPE );
.Ve
.Sp
The following will set the \f(CW\*(C`LC_CTYPE\*(C'\fR behaviour according to the locale
environment variables (the second argument \f(CW""\fR).
Please see your system's \f(CWsetlocale(3)\fR documentation for the locale
environment variables' meaning or consult perllocale.
.Sp
.Vb 1
\& $loc = setlocale( LC_CTYPE, "" );
.Ve
.Sp
The following will set the \f(CW\*(C`LC_COLLATE\*(C'\fR behaviour to Argentinian
Spanish. \fBNOTE\fR: The naming and availability of locales depends on
your operating system. Please consult perllocale for how to find
out which locales are available in your system.
.Sp
.Vb 1
\& $loc = setlocale( LC_COLLATE, "es_AR.ISO8859\-1" );
.Ve
.ie n .IP """setpayload""" 8
.el .IP \f(CWsetpayload\fR 8
.IX Item "setpayload"
.Vb 2
\& use POSIX \*(Aq:nan_payload\*(Aq;
\& setpayload($var, $payload);
.Ve
.Sp
Sets the \f(CW\*(C`NaN\*(C'\fR payload of var. Added in Perl v5.24.
.Sp
NOTE: the NaN payload APIs are based on the latest (as of June 2015)
proposed ISO C interfaces, but they are not yet a standard. Things
may change.
.Sp
See "nan" for more discussion about \f(CW\*(C`NaN\*(C'\fR.
.Sp
See also "setpayloadsig", "isnan", "getpayload", and "issignaling".
.ie n .IP """setpayloadsig""" 8
.el .IP \f(CWsetpayloadsig\fR 8
.IX Item "setpayloadsig"
.Vb 2
\& use POSIX \*(Aq:nan_payload\*(Aq;
\& setpayloadsig($var, $payload);
.Ve
.Sp
Like "setpayload" but also makes the NaN \fIsignaling\fR. Added in Perl
v5.24.
.Sp
Depending on the platform the NaN may or may not behave differently.
.Sp
Note the API instability warning in "setpayload".
.Sp
Note that because how the floating point formats work out, on the most
common platforms signaling payload of zero is best avoided,
since it might end up being identical to \f(CW\*(C`+Inf\*(C'\fR.
.Sp
See also "nan", "isnan", "getpayload", and "issignaling".
.ie n .IP """setpgid""" 8
.el .IP \f(CWsetpgid\fR 8
.IX Item "setpgid"
This is similar to the C function \f(CWsetpgid()\fR for
setting the process group identifier of the current process.
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """setsid""" 8
.el .IP \f(CWsetsid\fR 8
.IX Item "setsid"
This is identical to the C function \f(CWsetsid()\fR for
setting the session identifier of the current process.
.ie n .IP """setuid""" 8
.el .IP \f(CWsetuid\fR 8
.IX Item "setuid"
Sets the real user identifier and the effective user identifier for
this process. Similar to assigning a value to the Perl's builtin
\&\f(CW$<\fR variable, see "$UID" in perlvar, except that the latter
will change only the real user identifier.
.ie n .IP """sigaction""" 8
.el .IP \f(CWsigaction\fR 8
.IX Item "sigaction"
Detailed signal management. This uses \f(CW\*(C`POSIX::SigAction\*(C'\fR objects for
the \f(CW\*(C`action\*(C'\fR and \f(CW\*(C`oldaction\*(C'\fR arguments (the oldaction can also be
just a hash reference). Consult your system's \f(CW\*(C`sigaction\*(C'\fR manpage
for details, see also "POSIX::SigRt".
.Sp
Synopsis:
.Sp
.Vb 1
\& sigaction(signal, action, oldaction = 0)
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure. The \f(CW\*(C`signal\*(C'\fR must be a number (like
\&\f(CW\*(C`SIGHUP\*(C'\fR), not a string (like \f(CW"SIGHUP"\fR), though Perl does try hard
to understand you.
.Sp
If you use the \f(CW\*(C`SA_SIGINFO\*(C'\fR flag, the signal handler will in addition to
the first argument, the signal name, also receive a second argument, a
hash reference, inside which are the following keys with the following
semantics, as defined by POSIX/SUSv3:
.Sp
.Vb 5
\& signo the signal number
\& errno the error number
\& code if this is zero or less, the signal was sent by
\& a user process and the uid and pid make sense,
\& otherwise the signal was sent by the kernel
.Ve
.Sp
The constants for specific \f(CW\*(C`code\*(C'\fR values can be imported individually
or using the \f(CW\*(C`:signal_h_si_code\*(C'\fR tag, since Perl v5.24.
.Sp
The following are also defined by POSIX/SUSv3, but unfortunately
not very widely implemented:
.Sp
.Vb 6
\& pid the process id generating the signal
\& uid the uid of the process id generating the signal
\& status exit value or signal for SIGCHLD
\& band band event for SIGPOLL
\& addr address of faulting instruction or memory
\& reference for SIGILL, SIGFPE, SIGSEGV or SIGBUS
.Ve
.Sp
A third argument is also passed to the handler, which contains a copy
of the raw binary contents of the \f(CW\*(C`siginfo\*(C'\fR structure: if a system has
some non-POSIX fields, this third argument is where to \f(CWunpack()\fR them
from.
.Sp
Note that not all \f(CW\*(C`siginfo\*(C'\fR values make sense simultaneously (some are
valid only for certain signals, for example), and not all values make
sense from Perl perspective, you should to consult your system's
\&\f(CW\*(C`sigaction\*(C'\fR and possibly also \f(CW\*(C`siginfo\*(C'\fR documentation.
.ie n .IP """siglongjmp""" 8
.el .IP \f(CWsiglongjmp\fR 8
.IX Item "siglongjmp"
Not implemented. \f(CWsiglongjmp()\fR is C\-specific: use "die" in perlfunc instead.
.ie n .IP """signbit""" 8
.el .IP \f(CWsignbit\fR 8
.IX Item "signbit"
Returns zero for positive arguments, non-zero for negative arguments [C99].
Added in Perl v5.22.
.ie n .IP """sigpending""" 8
.el .IP \f(CWsigpending\fR 8
.IX Item "sigpending"
Examine signals that are blocked and pending. This uses \f(CW\*(C`POSIX::SigSet\*(C'\fR
objects for the \f(CW\*(C`sigset\*(C'\fR argument. Consult your system's \f(CW\*(C`sigpending\*(C'\fR
manpage for details.
.Sp
Synopsis:
.Sp
.Vb 1
\& sigpending(sigset)
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """sigprocmask""" 8
.el .IP \f(CWsigprocmask\fR 8
.IX Item "sigprocmask"
Change and/or examine calling process's signal mask. This uses
\&\f(CW\*(C`POSIX::SigSet\*(C'\fR objects for the \f(CW\*(C`sigset\*(C'\fR and \f(CW\*(C`oldsigset\*(C'\fR arguments.
Consult your system's \f(CW\*(C`sigprocmask\*(C'\fR manpage for details.
.Sp
Synopsis:
.Sp
.Vb 1
\& sigprocmask(how, sigset, oldsigset = 0)
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.Sp
Note that you can't reliably block or unblock a signal from its own signal
handler if you're using safe signals. Other signals can be blocked or unblocked
reliably.
.ie n .IP """sigsetjmp""" 8
.el .IP \f(CWsigsetjmp\fR 8
.IX Item "sigsetjmp"
Not implemented. \f(CWsigsetjmp()\fR is C\-specific: use \f(CW\*(C`eval {}\*(C'\fR instead,
see "eval" in perlfunc.
.ie n .IP """sigsuspend""" 8
.el .IP \f(CWsigsuspend\fR 8
.IX Item "sigsuspend"
Install a signal mask and suspend process until signal arrives. This uses
\&\f(CW\*(C`POSIX::SigSet\*(C'\fR objects for the \f(CW\*(C`signal_mask\*(C'\fR argument. Consult your
system's \f(CW\*(C`sigsuspend\*(C'\fR manpage for details.
.Sp
Synopsis:
.Sp
.Vb 1
\& sigsuspend(signal_mask)
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """sin""" 8
.el .IP \f(CWsin\fR 8
.IX Item "sin"
This is identical to Perl's builtin \f(CWsin()\fR function
for returning the sine of the numerical argument,
see "sin" in perlfunc. See also Math::Trig.
.ie n .IP """sinh""" 8
.el .IP \f(CWsinh\fR 8
.IX Item "sinh"
This is identical to the C function \f(CWsinh()\fR
for returning the hyperbolic sine of the numerical argument.
See also Math::Trig.
.ie n .IP """sleep""" 8
.el .IP \f(CWsleep\fR 8
.IX Item "sleep"
This is functionally identical to Perl's builtin \f(CWsleep()\fR function
for suspending the execution of the current for process for certain
number of seconds, see "sleep" in perlfunc. There is one significant
difference, however: \f(CWPOSIX::sleep()\fR returns the number of
\&\fBunslept\fR seconds, while the \f(CWCORE::sleep()\fR returns the
number of slept seconds.
.ie n .IP """sprintf""" 8
.el .IP \f(CWsprintf\fR 8
.IX Item "sprintf"
This is similar to Perl's builtin \f(CWsprintf()\fR function
for returning a string that has the arguments formatted as requested,
see "sprintf" in perlfunc.
.ie n .IP """sqrt""" 8
.el .IP \f(CWsqrt\fR 8
.IX Item "sqrt"
This is identical to Perl's builtin \f(CWsqrt()\fR function.
for returning the square root of the numerical argument,
see "sqrt" in perlfunc.
.ie n .IP """srand""" 8
.el .IP \f(CWsrand\fR 8
.IX Item "srand"
Give a seed the pseudorandom number generator, see "srand" in perlfunc.
.ie n .IP """sscanf""" 8
.el .IP \f(CWsscanf\fR 8
.IX Item "sscanf"
Not implemented. \f(CWsscanf()\fR is C\-specific, use regular expressions instead,
see perlre.
.ie n .IP """stat""" 8
.el .IP \f(CWstat\fR 8
.IX Item "stat"
This is identical to Perl's builtin \f(CWstat()\fR function
for returning information about files and directories.
.ie n .IP """strcat""" 8
.el .IP \f(CWstrcat\fR 8
.IX Item "strcat"
Not implemented. \f(CWstrcat()\fR is C\-specific, use \f(CW\*(C`.=\*(C'\fR instead, see perlop.
.ie n .IP """strchr""" 8
.el .IP \f(CWstrchr\fR 8
.IX Item "strchr"
Not implemented. \f(CWstrchr()\fR is C\-specific, see "index" in perlfunc instead.
.ie n .IP """strcmp""" 8
.el .IP \f(CWstrcmp\fR 8
.IX Item "strcmp"
Not implemented. \f(CWstrcmp()\fR is C\-specific, use \f(CW\*(C`eq\*(C'\fR or \f(CW\*(C`cmp\*(C'\fR instead, see perlop.
.ie n .IP """strcoll""" 8
.el .IP \f(CWstrcoll\fR 8
.IX Item "strcoll"
This is identical to the C function \f(CWstrcoll()\fR
for collating (comparing) strings transformed using
the \f(CWstrxfrm()\fR function. Not really needed since
Perl can do this transparently, see perllocale.
.Sp
Beware that in a UTF\-8 locale, anything you pass to this function must
be in UTF\-8; and when not in a UTF\-8 locale, anything passed must not be
UTF\-8 encoded.
.Sp
Note also that it doesn't make sense for a string to be encoded in one
locale (say, ISO\-8859\-6, Arabic) and to collate it based on another
(like ISO\-8859\-7, Greek). The results will be essentially meaningless.
.ie n .IP """strcpy""" 8
.el .IP \f(CWstrcpy\fR 8
.IX Item "strcpy"
Not implemented. \f(CWstrcpy()\fR is C\-specific, use \f(CW\*(C`=\*(C'\fR instead, see perlop.
.ie n .IP """strcspn""" 8
.el .IP \f(CWstrcspn\fR 8
.IX Item "strcspn"
Not implemented. \f(CWstrcspn()\fR is C\-specific, use regular expressions instead,
see perlre.
.ie n .IP """strerror""" 8
.el .IP \f(CWstrerror\fR 8
.IX Item "strerror"
Returns the error string for the specified errno.
Identical to the string form of \f(CW$!\fR, see "$ERRNO" in perlvar.
.ie n .IP """strftime""" 8
.el .IP \f(CWstrftime\fR 8
.IX Item "strftime"
Convert date and time information to string. Returns the string.
.Sp
Synopsis:
.Sp
.Vb 2
\& strftime(fmt, sec, min, hour, mday, mon, year,
\& wday = \-1, yday = \-1, isdst = \-1)
.Ve
.Sp
The month (\f(CW\*(C`mon\*(C'\fR), weekday (\f(CW\*(C`wday\*(C'\fR), and yearday (\f(CW\*(C`yday\*(C'\fR) begin at zero,
\&\fIi.e.\fR, January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1. The
year (\f(CW\*(C`year\*(C'\fR) is given in years since 1900, \fIi.e.\fR, the year 1995 is 95; the
year 2001 is 101. Consult your system's \f(CWstrftime()\fR manpage for details
about these and the other arguments.
.Sp
If you want your code to be portable, your format (\f(CW\*(C`fmt\*(C'\fR) argument
should use only the conversion specifiers defined by the ANSI C
standard (C99, to play safe). These are \f(CW\*(C`aAbBcdHIjmMpSUwWxXyYZ%\*(C'\fR.
But even then, the \fBresults\fR of some of the conversion specifiers are
non-portable. For example, the specifiers \f(CW\*(C`aAbBcpZ\*(C'\fR change according
to the locale settings of the user, and both how to set locales (the
locale names) and what output to expect are non-standard.
The specifier \f(CW\*(C`c\*(C'\fR changes according to the timezone settings of the
user and the timezone computation rules of the operating system.
The \f(CW\*(C`Z\*(C'\fR specifier is notoriously unportable since the names of
timezones are non-standard. Sticking to the numeric specifiers is the
safest route.
.Sp
The given arguments are made consistent as though by calling
\&\f(CWmktime()\fR before calling your system's \f(CWstrftime()\fR function,
except that the \f(CW\*(C`isdst\*(C'\fR value is not affected.
.Sp
The string for Tuesday, December 12, 1995.
.Sp
.Vb 3
\& $str = POSIX::strftime( "%A, %B %d, %Y",
\& 0, 0, 0, 12, 11, 95, 2 );
\& print "$str\en";
.Ve
.ie n .IP """strlen""" 8
.el .IP \f(CWstrlen\fR 8
.IX Item "strlen"
Not implemented. \f(CWstrlen()\fR is C\-specific, use \f(CWlength()\fR instead, see "length" in perlfunc.
.ie n .IP """strncat""" 8
.el .IP \f(CWstrncat\fR 8
.IX Item "strncat"
Not implemented. \f(CWstrncat()\fR is C\-specific, use \f(CW\*(C`.=\*(C'\fR instead, see perlop.
.ie n .IP """strncmp""" 8
.el .IP \f(CWstrncmp\fR 8
.IX Item "strncmp"
Not implemented. \f(CWstrncmp()\fR is C\-specific, use \f(CW\*(C`eq\*(C'\fR instead, see perlop.
.ie n .IP """strncpy""" 8
.el .IP \f(CWstrncpy\fR 8
.IX Item "strncpy"
Not implemented. \f(CWstrncpy()\fR is C\-specific, use \f(CW\*(C`=\*(C'\fR instead, see perlop.
.ie n .IP """strpbrk""" 8
.el .IP \f(CWstrpbrk\fR 8
.IX Item "strpbrk"
Not implemented. \f(CWstrpbrk()\fR is C\-specific, use regular expressions instead,
see perlre.
.ie n .IP """strrchr""" 8
.el .IP \f(CWstrrchr\fR 8
.IX Item "strrchr"
Not implemented. \f(CWstrrchr()\fR is C\-specific, see "rindex" in perlfunc instead.
.ie n .IP """strspn""" 8
.el .IP \f(CWstrspn\fR 8
.IX Item "strspn"
Not implemented. \f(CWstrspn()\fR is C\-specific, use regular expressions instead,
see perlre.
.ie n .IP """strstr""" 8
.el .IP \f(CWstrstr\fR 8
.IX Item "strstr"
This is identical to Perl's builtin \f(CWindex()\fR function,
see "index" in perlfunc.
.ie n .IP """strtod""" 8
.el .IP \f(CWstrtod\fR 8
.IX Item "strtod"
String to double translation. Returns the parsed number and the number
of characters in the unparsed portion of the string. Truly
POSIX-compliant systems set \f(CW$!\fR (\f(CW$ERRNO\fR) to indicate a translation
error, so clear \f(CW$!\fR before calling \f(CW\*(C`strtod\*(C'\fR. However, non-POSIX systems
may not check for overflow, and therefore will never set \f(CW$!\fR.
.Sp
\&\f(CW\*(C`strtod\*(C'\fR respects any POSIX \f(CWsetlocale()\fR \f(CW\*(C`LC_NUMERIC\*(C'\fR settings,
regardless of whether or not it is called from Perl code that is within
the scope of \f(CW\*(C`use\ locale\*(C'\fR. Prior to Perl 5.28, or when operating in
a non thread-safe environment, it should not be used in a threaded
application unless it's certain that the underlying locale is C
or POSIX. This is because it otherwise changes the locale, which
globally affects all threads simultaneously.
.Sp
To parse a string \f(CW$str\fR as a floating point number use
.Sp
.Vb 2
\& $! = 0;
\& ($num, $n_unparsed) = POSIX::strtod($str);
.Ve
.Sp
The second returned item and \f(CW$!\fR can be used to check for valid input:
.Sp
.Vb 3
\& if (($str eq \*(Aq\*(Aq) || ($n_unparsed != 0) || $!) {
\& die "Non\-numeric input $str" . ($! ? ": $!\en" : "\en");
\& }
.Ve
.Sp
When called in a scalar context \f(CW\*(C`strtod\*(C'\fR returns the parsed number.
.ie n .IP """strtok""" 8
.el .IP \f(CWstrtok\fR 8
.IX Item "strtok"
Not implemented. \f(CWstrtok()\fR is C\-specific, use regular expressions instead, see
perlre, or "split" in perlfunc.
.ie n .IP """strtol""" 8
.el .IP \f(CWstrtol\fR 8
.IX Item "strtol"
String to (long) integer translation. Returns the parsed number and
the number of characters in the unparsed portion of the string. Truly
POSIX-compliant systems set \f(CW$!\fR (\f(CW$ERRNO\fR) to indicate a translation
error, so clear \f(CW$!\fR before calling \f(CW\*(C`strtol\*(C'\fR. However, non-POSIX systems
may not check for overflow, and therefore will never set \f(CW$!\fR.
.Sp
\&\f(CW\*(C`strtol\*(C'\fR should respect any POSIX \fR\f(BIsetlocale()\fR\fI\fR settings.
.Sp
To parse a string \f(CW$str\fR as a number in some base \f(CW$base\fR use
.Sp
.Vb 2
\& $! = 0;
\& ($num, $n_unparsed) = POSIX::strtol($str, $base);
.Ve
.Sp
The base should be zero or between 2 and 36, inclusive. When the base
is zero or omitted \f(CW\*(C`strtol\*(C'\fR will use the string itself to determine the
base: a leading "0x" or "0X" means hexadecimal; a leading "0" means
octal; any other leading characters mean decimal. Thus, "1234" is
parsed as a decimal number, "01234" as an octal number, and "0x1234"
as a hexadecimal number.
.Sp
The second returned item and \f(CW$!\fR can be used to check for valid input:
.Sp
.Vb 3
\& if (($str eq \*(Aq\*(Aq) || ($n_unparsed != 0) || !$!) {
\& die "Non\-numeric input $str" . $! ? ": $!\en" : "\en";
\& }
.Ve
.Sp
When called in a scalar context \f(CW\*(C`strtol\*(C'\fR returns the parsed number.
.ie n .IP """strtold""" 8
.el .IP \f(CWstrtold\fR 8
.IX Item "strtold"
Like "strtod" but for long doubles. Defined only if the
system supports long doubles.
.ie n .IP """strtoul""" 8
.el .IP \f(CWstrtoul\fR 8
.IX Item "strtoul"
String to unsigned (long) integer translation. \f(CWstrtoul()\fR is identical
to \f(CWstrtol()\fR except that \f(CWstrtoul()\fR only parses unsigned integers. See
"strtol" for details.
.Sp
Note: Some vendors supply \f(CWstrtod()\fR and \f(CWstrtol()\fR but not \f(CWstrtoul()\fR.
Other vendors that do supply \f(CWstrtoul()\fR parse "\-1" as a valid value.
.ie n .IP """strxfrm""" 8
.el .IP \f(CWstrxfrm\fR 8
.IX Item "strxfrm"
String transformation. Returns the transformed string.
.Sp
.Vb 1
\& $dst = POSIX::strxfrm( $src );
.Ve
.Sp
Used with \f(CW\*(C`eq\*(C'\fR or \f(CW\*(C`cmp\*(C'\fR as an alternative to \f(CW"strcoll"\fR.
.Sp
Not really needed since Perl can do this transparently, see
perllocale.
.Sp
Unlike the libc \f(CW\*(C`strxfrm\*(C'\fR, this allows NUL characters in the input
\&\f(CW$src\fR.
.Sp
It doesn't make sense for a string to be encoded in one locale (say,
ISO\-8859\-6, Arabic) and to collate it based on another (like ISO\-8859\-7,
Greek). Perl assumes that the current \f(CW\*(C`LC_CTYPE\*(C'\fR locale correctly
represents the encoding of \f(CW$src\fR, and ignores the value of
\&\f(CW\*(C`LC_COLLATE\*(C'\fR.
.ie n .IP """sysconf""" 8
.el .IP \f(CWsysconf\fR 8
.IX Item "sysconf"
Retrieves values of system configurable variables.
.Sp
The following will get the machine's clock speed.
.Sp
.Vb 1
\& $clock_ticks = POSIX::sysconf( &POSIX::_SC_CLK_TCK );
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """system""" 8
.el .IP \f(CWsystem\fR 8
.IX Item "system"
This is identical to Perl's builtin \f(CWsystem()\fR function, see
"system" in perlfunc.
.ie n .IP """tan""" 8
.el .IP \f(CWtan\fR 8
.IX Item "tan"
This is identical to the C function \f(CWtan()\fR, returning the
tangent of the numerical argument. See also Math::Trig.
.ie n .IP """tanh""" 8
.el .IP \f(CWtanh\fR 8
.IX Item "tanh"
This is identical to the C function \f(CWtanh()\fR, returning the
hyperbolic tangent of the numerical argument. See also Math::Trig.
.ie n .IP """tcdrain""" 8
.el .IP \f(CWtcdrain\fR 8
.IX Item "tcdrain"
This is similar to the C function \f(CWtcdrain()\fR for draining
the output queue of its argument stream.
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """tcflow""" 8
.el .IP \f(CWtcflow\fR 8
.IX Item "tcflow"
This is similar to the C function \f(CWtcflow()\fR for controlling
the flow of its argument stream.
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """tcflush""" 8
.el .IP \f(CWtcflush\fR 8
.IX Item "tcflush"
This is similar to the C function \f(CWtcflush()\fR for flushing
the I/O buffers of its argument stream.
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """tcgetpgrp""" 8
.el .IP \f(CWtcgetpgrp\fR 8
.IX Item "tcgetpgrp"
This is identical to the C function \f(CWtcgetpgrp()\fR for returning the
process group identifier of the foreground process group of the controlling
terminal.
.ie n .IP """tcsendbreak""" 8
.el .IP \f(CWtcsendbreak\fR 8
.IX Item "tcsendbreak"
This is similar to the C function \f(CWtcsendbreak()\fR for sending
a break on its argument stream.
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """tcsetpgrp""" 8
.el .IP \f(CWtcsetpgrp\fR 8
.IX Item "tcsetpgrp"
This is similar to the C function \f(CWtcsetpgrp()\fR for setting the
process group identifier of the foreground process group of the controlling
terminal.
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """tgamma""" 8
.el .IP \f(CWtgamma\fR 8
.IX Item "tgamma"
The Gamma function [C99]. Added in Perl v5.22.
.Sp
See also "lgamma".
.ie n .IP """time""" 8
.el .IP \f(CWtime\fR 8
.IX Item "time"
This is identical to Perl's builtin \f(CWtime()\fR function
for returning the number of seconds since the epoch
(whatever it is for the system), see "time" in perlfunc.
.ie n .IP """times""" 8
.el .IP \f(CWtimes\fR 8
.IX Item "times"
The \f(CWtimes()\fR function returns elapsed realtime since some point in the past
(such as system startup), user and system times for this process, and user
and system times used by child processes. All times are returned in clock
ticks.
.Sp
.Vb 2
\& ($realtime, $user, $system, $cuser, $csystem)
\& = POSIX::times();
.Ve
.Sp
Note: Perl's builtin \f(CWtimes()\fR function returns four values, measured in
seconds.
.ie n .IP """tmpfile""" 8
.el .IP \f(CWtmpfile\fR 8
.IX Item "tmpfile"
Not implemented. Use method \f(CWIO::File::new_tmpfile()\fR instead, or see File::Temp.
.ie n .IP """tmpnam""" 8
.el .IP \f(CWtmpnam\fR 8
.IX Item "tmpnam"
For security reasons, which are probably detailed in your system's
documentation for the C library \f(CWtmpnam()\fR function, this interface
is no longer available since Perl v5.26; instead use File::Temp.
.ie n .IP """tolower""" 8
.el .IP \f(CWtolower\fR 8
.IX Item "tolower"
This function has been removed as of Perl v5.26.
This is identical to the C function, except that it can apply to a single
character or to a whole string, and currently operates as if the locale
always is "C". Consider using the \f(CWlc()\fR function, see "lc" in perlfunc,
see "lc" in perlfunc, or the equivalent \f(CW\*(C`\eL\*(C'\fR operator inside doublequotish
strings.
.ie n .IP """toupper""" 8
.el .IP \f(CWtoupper\fR 8
.IX Item "toupper"
This function has been removed as of Perl v5.26.
This is similar to the C function, except that it can apply to a single
character or to a whole string, and currently operates as if the locale
always is "C". Consider using the \f(CWuc()\fR function, see "uc" in perlfunc,
or the equivalent \f(CW\*(C`\eU\*(C'\fR operator inside doublequotish strings.
.ie n .IP """trunc""" 8
.el .IP \f(CWtrunc\fR 8
.IX Item "trunc"
Returns the integer toward zero from the argument [C99]. Added in Perl
v5.22.
.Sp
See also "ceil", "floor", and "round".
.ie n .IP """ttyname""" 8
.el .IP \f(CWttyname\fR 8
.IX Item "ttyname"
This is identical to the C function \f(CWttyname()\fR for returning the
name of the current terminal.
.ie n .IP """tzname""" 8
.el .IP \f(CWtzname\fR 8
.IX Item "tzname"
Retrieves the time conversion information from the \f(CW\*(C`tzname\*(C'\fR variable.
.Sp
.Vb 2
\& POSIX::tzset();
\& ($std, $dst) = POSIX::tzname();
.Ve
.ie n .IP """tzset""" 8
.el .IP \f(CWtzset\fR 8
.IX Item "tzset"
This is identical to the C function \f(CWtzset()\fR for setting
the current timezone based on the environment variable \f(CW\*(C`TZ\*(C'\fR,
to be used by \f(CWctime()\fR, \f(CWlocaltime()\fR, \f(CWmktime()\fR, and \f(CWstrftime()\fR
functions.
.ie n .IP """umask""" 8
.el .IP \f(CWumask\fR 8
.IX Item "umask"
This is identical to Perl's builtin \f(CWumask()\fR function
for setting (and querying) the file creation permission mask,
see "umask" in perlfunc.
.ie n .IP """uname""" 8
.el .IP \f(CWuname\fR 8
.IX Item "uname"
Get name of current operating system.
.Sp
.Vb 2
\& ($sysname, $nodename, $release, $version, $machine)
\& = POSIX::uname();
.Ve
.Sp
Note that the actual meanings of the various fields are not
that well standardized, do not expect any great portability.
The \f(CW$sysname\fR might be the name of the operating system,
the \f(CW$nodename\fR might be the name of the host, the \f(CW$release\fR
might be the (major) release number of the operating system,
the \f(CW$version\fR might be the (minor) release number of the
operating system, and the \f(CW$machine\fR might be a hardware identifier.
Maybe.
.ie n .IP """ungetc""" 8
.el .IP \f(CWungetc\fR 8
.IX Item "ungetc"
Not implemented. Use method \f(CWIO::Handle::ungetc()\fR instead.
.ie n .IP """unlink""" 8
.el .IP \f(CWunlink\fR 8
.IX Item "unlink"
This is identical to Perl's builtin \f(CWunlink()\fR function
for removing files, see "unlink" in perlfunc.
.ie n .IP """utime""" 8
.el .IP \f(CWutime\fR 8
.IX Item "utime"
This is identical to Perl's builtin \f(CWutime()\fR function
for changing the time stamps of files and directories,
see "utime" in perlfunc.
.ie n .IP """vfprintf""" 8
.el .IP \f(CWvfprintf\fR 8
.IX Item "vfprintf"
Not implemented. \f(CWvfprintf()\fR is C\-specific, see "printf" in perlfunc instead.
.ie n .IP """vprintf""" 8
.el .IP \f(CWvprintf\fR 8
.IX Item "vprintf"
Not implemented. \f(CWvprintf()\fR is C\-specific, see "printf" in perlfunc instead.
.ie n .IP """vsprintf""" 8
.el .IP \f(CWvsprintf\fR 8
.IX Item "vsprintf"
Not implemented. \f(CWvsprintf()\fR is C\-specific, see "sprintf" in perlfunc instead.
.ie n .IP """wait""" 8
.el .IP \f(CWwait\fR 8
.IX Item "wait"
This is identical to Perl's builtin \f(CWwait()\fR function,
see "wait" in perlfunc.
.ie n .IP """waitpid""" 8
.el .IP \f(CWwaitpid\fR 8
.IX Item "waitpid"
Wait for a child process to change state. This is identical to Perl's
builtin \f(CWwaitpid()\fR function, see "waitpid" in perlfunc.
.Sp
.Vb 2
\& $pid = POSIX::waitpid( \-1, POSIX::WNOHANG );
\& print "status = ", ($? / 256), "\en";
.Ve
.Sp
See "mblen".
.ie n .IP """wctomb""" 8
.el .IP \f(CWwctomb\fR 8
.IX Item "wctomb"
This is the same as the C function \f(CWwctomb()\fR on unthreaded perls. On
threaded perls, it transparently (almost) substitutes the more
thread-safe \f(CW\*(C`wcrtomb\*(C'\fR(3), if available, instead of \f(CW\*(C`wctomb\*(C'\fR.
.Sp
Core Perl does not have any support for wide and multibyte locales,
except Unicode UTF\-8 locales. This function, in conjunction with
"mblen" and "mbtowc" may be used to roll your own decoding/encoding
of other types of multi-byte locales.
.Sp
Use \f(CW\*(C`undef\*(C'\fR as the first parameter to this function to get the effect
of passing NULL as the first parameter to \f(CW\*(C`wctomb\*(C'\fR. This ignores the
second parameter, and resets any shift state to its initial value. The
return value is undefined if \f(CW\*(C`wcrtomb\*(C'\fR was substituted, so you should
never rely on it.
.Sp
When the first parameter is a scalar, the code point contained in the
scalar second parameter is converted into a multi-byte string and stored
into the first parameter scalar. This is based on the locale that
currently underlies the program, regardless of whether or not the
function is called from Perl code that is within the scope of \f(CW\*(C`use\ locale\*(C'\fR. The return value is the number of bytes stored; or negative
if the code point isn't representable in the current locale. Perl makes
no attempt at hiding from your code any differences in the \f(CW\*(C`errno\*(C'\fR
setting between \f(CW\*(C`wctomb\*(C'\fR and \f(CW\*(C`wcrtomb\*(C'\fR. It does set \f(CW\*(C`errno\*(C'\fR to 0
before calling them.
.ie n .IP """write""" 8
.el .IP \f(CWwrite\fR 8
.IX Item "write"
Write to a file. This uses file descriptors such as those obtained by
calling \f(CW\*(C`POSIX::open\*(C'\fR.
.Sp
.Vb 3
\& $fd = POSIX::open( "foo", &POSIX::O_WRONLY );
\& $buf = "hello";
\& $bytes = POSIX::write( $fd, $buf, 5 );
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.Sp
See also "syswrite" in perlfunc.
.SH CLASSES
.IX Header "CLASSES"
.ie n .SS """POSIX::SigAction"""
.el .SS \f(CWPOSIX::SigAction\fP
.IX Subsection "POSIX::SigAction"
.ie n .IP """new""" 8
.el .IP \f(CWnew\fR 8
.IX Item "new"
Creates a new \f(CW\*(C`POSIX::SigAction\*(C'\fR object which corresponds to the C
\&\f(CW\*(C`struct sigaction\*(C'\fR. This object will be destroyed automatically when
it is no longer needed. The first parameter is the handler, a sub
reference. The second parameter is a \f(CW\*(C`POSIX::SigSet\*(C'\fR object, it
defaults to the empty set. The third parameter contains the
\&\f(CW\*(C`sa_flags\*(C'\fR, it defaults to 0.
.Sp
.Vb 4
\& $sigset = POSIX::SigSet\->new(SIGINT, SIGQUIT);
\& $sigaction = POSIX::SigAction\->new(
\& \e&handler, $sigset, &POSIX::SA_NOCLDSTOP
\& );
.Ve
.Sp
This \f(CW\*(C`POSIX::SigAction\*(C'\fR object is intended for use with the \f(CWPOSIX::sigaction()\fR
function.
.ie n .IP """handler""" 8
.el .IP \f(CWhandler\fR 8
.IX Item "handler"
.PD 0
.ie n .IP """mask""" 8
.el .IP \f(CWmask\fR 8
.IX Item "mask"
.ie n .IP """flags""" 8
.el .IP \f(CWflags\fR 8
.IX Item "flags"
.PD
accessor functions to get/set the values of a SigAction object.
.Sp
.Vb 2
\& $sigset = $sigaction\->mask;
\& $sigaction\->flags(&POSIX::SA_RESTART);
.Ve
.ie n .IP """safe""" 8
.el .IP \f(CWsafe\fR 8
.IX Item "safe"
accessor function for the "safe signals" flag of a SigAction object; see
perlipc for general information on safe (a.k.a. "deferred") signals. If
you wish to handle a signal safely, use this accessor to set the "safe" flag
in the \f(CW\*(C`POSIX::SigAction\*(C'\fR object:
.Sp
.Vb 1
\& $sigaction\->safe(1);
.Ve
.Sp
You may also examine the "safe" flag on the output action object which is
filled in when given as the third parameter to \f(CWPOSIX::sigaction()\fR:
.Sp
.Vb 4
\& sigaction(SIGINT, $new_action, $old_action);
\& if ($old_action\->safe) {
\& # previous SIGINT handler used safe signals
\& }
.Ve
.ie n .SS """POSIX::SigRt"""
.el .SS \f(CWPOSIX::SigRt\fP
.IX Subsection "POSIX::SigRt"
.ie n .IP %SIGRT 8
.el .IP \f(CW%SIGRT\fR 8
.IX Item "%SIGRT"
A hash of the POSIX realtime signal handlers. It is an extension of
the standard \f(CW%SIG\fR, the \f(CW$POSIX::SIGRT{SIGRTMIN}\fR is roughly equivalent
to \f(CW$SIG{SIGRTMIN}\fR, but the right POSIX moves (see below) are made with
the \f(CW\*(C`POSIX::SigSet\*(C'\fR and \f(CW\*(C`POSIX::sigaction\*(C'\fR instead of accessing the \f(CW%SIG\fR.
.Sp
You can set the \f(CW%POSIX::SIGRT\fR elements to set the POSIX realtime
signal handlers, use \f(CW\*(C`delete\*(C'\fR and \f(CW\*(C`exists\*(C'\fR on the elements, and use
\&\f(CW\*(C`scalar\*(C'\fR on the \f(CW%POSIX::SIGRT\fR to find out how many POSIX realtime
signals there are available \f(CW\*(C`(SIGRTMAX\ \-\ SIGRTMIN\ +\ 1\*(C'\fR, the \f(CW\*(C`SIGRTMAX\*(C'\fR is
a valid POSIX realtime signal).
.Sp
Setting the \f(CW%SIGRT\fR elements is equivalent to calling this:
.Sp
.Vb 6
\& sub new {
\& my ($rtsig, $handler, $flags) = @_;
\& my $sigset = POSIX::SigSet($rtsig);
\& my $sigact = POSIX::SigAction\->new($handler,$sigset,$flags);
\& sigaction($rtsig, $sigact);
\& }
.Ve
.Sp
The flags default to zero, if you want something different you can
either use \f(CW\*(C`local\*(C'\fR on \f(CW$POSIX::SigRt::SIGACTION_FLAGS\fR, or you can
derive from POSIX::SigRt and define your own \f(CWnew()\fR (the tied hash
STORE method of the \f(CW%SIGRT\fR calls \f(CW\*(C`new($rtsig, $handler, $SIGACTION_FLAGS)\*(C'\fR,
where the \f(CW$rtsig\fR ranges from zero to \f(CW\*(C`SIGRTMAX\ \-\ SIGRTMIN\ +\ 1)\*(C'\fR.
.Sp
Just as with any signal, you can use \f(CW\*(C`sigaction($rtsig, undef, $oa)\*(C'\fR to
retrieve the installed signal handler (or, rather, the signal action).
.Sp
\&\fBNOTE:\fR whether POSIX realtime signals really work in your system, or
whether Perl has been compiled so that it works with them, is outside
of this discussion.
.ie n .IP """SIGRTMIN""" 8
.el .IP \f(CWSIGRTMIN\fR 8
.IX Item "SIGRTMIN"
Return the minimum POSIX realtime signal number available, or \f(CW\*(C`undef\*(C'\fR
if no POSIX realtime signals are available.
.ie n .IP """SIGRTMAX""" 8
.el .IP \f(CWSIGRTMAX\fR 8
.IX Item "SIGRTMAX"
Return the maximum POSIX realtime signal number available, or \f(CW\*(C`undef\*(C'\fR
if no POSIX realtime signals are available.
.ie n .SS """POSIX::SigSet"""
.el .SS \f(CWPOSIX::SigSet\fP
.IX Subsection "POSIX::SigSet"
.ie n .IP """new""" 8
.el .IP \f(CWnew\fR 8
.IX Item "new"
Create a new SigSet object. This object will be destroyed automatically
when it is no longer needed. Arguments may be supplied to initialize the
set.
.Sp
Create an empty set.
.Sp
.Vb 1
\& $sigset = POSIX::SigSet\->new;
.Ve
.Sp
Create a set with \f(CW\*(C`SIGUSR1\*(C'\fR.
.Sp
.Vb 1
\& $sigset = POSIX::SigSet\->new( &POSIX::SIGUSR1 );
.Ve
.Sp
Throws an error if any of the signals supplied cannot be added to the
set.
.ie n .IP """addset""" 8
.el .IP \f(CWaddset\fR 8
.IX Item "addset"
Add a signal to a SigSet object.
.Sp
.Vb 1
\& $sigset\->addset( &POSIX::SIGUSR2 );
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """delset""" 8
.el .IP \f(CWdelset\fR 8
.IX Item "delset"
Remove a signal from the SigSet object.
.Sp
.Vb 1
\& $sigset\->delset( &POSIX::SIGUSR2 );
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """emptyset""" 8
.el .IP \f(CWemptyset\fR 8
.IX Item "emptyset"
Initialize the SigSet object to be empty.
.Sp
.Vb 1
\& $sigset\->emptyset();
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """fillset""" 8
.el .IP \f(CWfillset\fR 8
.IX Item "fillset"
Initialize the SigSet object to include all signals.
.Sp
.Vb 1
\& $sigset\->fillset();
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """ismember""" 8
.el .IP \f(CWismember\fR 8
.IX Item "ismember"
Tests the SigSet object to see if it contains a specific signal.
.Sp
.Vb 3
\& if( $sigset\->ismember( &POSIX::SIGUSR1 ) ){
\& print "contains SIGUSR1\en";
\& }
.Ve
.ie n .SS """POSIX::Termios"""
.el .SS \f(CWPOSIX::Termios\fP
.IX Subsection "POSIX::Termios"
.ie n .IP """new""" 8
.el .IP \f(CWnew\fR 8
.IX Item "new"
Create a new Termios object. This object will be destroyed automatically
when it is no longer needed. A Termios object corresponds to the \f(CW\*(C`termios\*(C'\fR
C struct. \f(CWnew()\fR mallocs a new one, \f(CWgetattr()\fR fills it from a file descriptor,
and \f(CWsetattr()\fR sets a file descriptor's parameters to match Termios' contents.
.Sp
.Vb 1
\& $termios = POSIX::Termios\->new;
.Ve
.ie n .IP """getattr""" 8
.el .IP \f(CWgetattr\fR 8
.IX Item "getattr"
Get terminal control attributes.
.Sp
Obtain the attributes for \f(CW\*(C`stdin\*(C'\fR.
.Sp
.Vb 2
\& $termios\->getattr( 0 ) # Recommended for clarity.
\& $termios\->getattr()
.Ve
.Sp
Obtain the attributes for stdout.
.Sp
.Vb 1
\& $termios\->getattr( 1 )
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """getcc""" 8
.el .IP \f(CWgetcc\fR 8
.IX Item "getcc"
Retrieve a value from the \f(CW\*(C`c_cc\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object. The \f(CW\*(C`c_cc\*(C'\fR field is
an array so an index must be specified.
.Sp
.Vb 1
\& $c_cc[1] = $termios\->getcc(1);
.Ve
.ie n .IP """getcflag""" 8
.el .IP \f(CWgetcflag\fR 8
.IX Item "getcflag"
Retrieve the \f(CW\*(C`c_cflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
.Sp
.Vb 1
\& $c_cflag = $termios\->getcflag;
.Ve
.ie n .IP """getiflag""" 8
.el .IP \f(CWgetiflag\fR 8
.IX Item "getiflag"
Retrieve the \f(CW\*(C`c_iflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
.Sp
.Vb 1
\& $c_iflag = $termios\->getiflag;
.Ve
.ie n .IP """getispeed""" 8
.el .IP \f(CWgetispeed\fR 8
.IX Item "getispeed"
Retrieve the input baud rate.
.Sp
.Vb 1
\& $ispeed = $termios\->getispeed;
.Ve
.ie n .IP """getlflag""" 8
.el .IP \f(CWgetlflag\fR 8
.IX Item "getlflag"
Retrieve the \f(CW\*(C`c_lflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
.Sp
.Vb 1
\& $c_lflag = $termios\->getlflag;
.Ve
.ie n .IP """getoflag""" 8
.el .IP \f(CWgetoflag\fR 8
.IX Item "getoflag"
Retrieve the \f(CW\*(C`c_oflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
.Sp
.Vb 1
\& $c_oflag = $termios\->getoflag;
.Ve
.ie n .IP """getospeed""" 8
.el .IP \f(CWgetospeed\fR 8
.IX Item "getospeed"
Retrieve the output baud rate.
.Sp
.Vb 1
\& $ospeed = $termios\->getospeed;
.Ve
.ie n .IP """setattr""" 8
.el .IP \f(CWsetattr\fR 8
.IX Item "setattr"
Set terminal control attributes.
.Sp
Set attributes immediately for stdout.
.Sp
.Vb 1
\& $termios\->setattr( 1, &POSIX::TCSANOW );
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """setcc""" 8
.el .IP \f(CWsetcc\fR 8
.IX Item "setcc"
Set a value in the \f(CW\*(C`c_cc\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object. The \f(CW\*(C`c_cc\*(C'\fR field is an
array so an index must be specified.
.Sp
.Vb 1
\& $termios\->setcc( &POSIX::VEOF, 1 );
.Ve
.ie n .IP """setcflag""" 8
.el .IP \f(CWsetcflag\fR 8
.IX Item "setcflag"
Set the \f(CW\*(C`c_cflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
.Sp
.Vb 1
\& $termios\->setcflag( $c_cflag | &POSIX::CLOCAL );
.Ve
.ie n .IP """setiflag""" 8
.el .IP \f(CWsetiflag\fR 8
.IX Item "setiflag"
Set the \f(CW\*(C`c_iflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
.Sp
.Vb 1
\& $termios\->setiflag( $c_iflag | &POSIX::BRKINT );
.Ve
.ie n .IP """setispeed""" 8
.el .IP \f(CWsetispeed\fR 8
.IX Item "setispeed"
Set the input baud rate.
.Sp
.Vb 1
\& $termios\->setispeed( &POSIX::B9600 );
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.ie n .IP """setlflag""" 8
.el .IP \f(CWsetlflag\fR 8
.IX Item "setlflag"
Set the \f(CW\*(C`c_lflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
.Sp
.Vb 1
\& $termios\->setlflag( $c_lflag | &POSIX::ECHO );
.Ve
.ie n .IP """setoflag""" 8
.el .IP \f(CWsetoflag\fR 8
.IX Item "setoflag"
Set the \f(CW\*(C`c_oflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
.Sp
.Vb 1
\& $termios\->setoflag( $c_oflag | &POSIX::OPOST );
.Ve
.ie n .IP """setospeed""" 8
.el .IP \f(CWsetospeed\fR 8
.IX Item "setospeed"
Set the output baud rate.
.Sp
.Vb 1
\& $termios\->setospeed( &POSIX::B9600 );
.Ve
.Sp
Returns \f(CW\*(C`undef\*(C'\fR on failure.
.IP "Baud rate values" 8
.IX Item "Baud rate values"
\&\f(CW\*(C`B38400\*(C'\fR \f(CW\*(C`B75\*(C'\fR \f(CW\*(C`B200\*(C'\fR \f(CW\*(C`B134\*(C'\fR \f(CW\*(C`B300\*(C'\fR \f(CW\*(C`B1800\*(C'\fR \f(CW\*(C`B150\*(C'\fR \f(CW\*(C`B0\*(C'\fR \f(CW\*(C`B19200\*(C'\fR \f(CW\*(C`B1200\*(C'\fR \f(CW\*(C`B9600\*(C'\fR \f(CW\*(C`B600\*(C'\fR \f(CW\*(C`B4800\*(C'\fR \f(CW\*(C`B50\*(C'\fR \f(CW\*(C`B2400\*(C'\fR \f(CW\*(C`B110\*(C'\fR
.IP "Terminal interface values" 8
.IX Item "Terminal interface values"
\&\f(CW\*(C`TCSADRAIN\*(C'\fR \f(CW\*(C`TCSANOW\*(C'\fR \f(CW\*(C`TCOON\*(C'\fR \f(CW\*(C`TCIOFLUSH\*(C'\fR \f(CW\*(C`TCOFLUSH\*(C'\fR \f(CW\*(C`TCION\*(C'\fR \f(CW\*(C`TCIFLUSH\*(C'\fR \f(CW\*(C`TCSAFLUSH\*(C'\fR \f(CW\*(C`TCIOFF\*(C'\fR \f(CW\*(C`TCOOFF\*(C'\fR
.ie n .IP """c_cc"" field values" 8
.el .IP "\f(CWc_cc\fR field values" 8
.IX Item "c_cc field values"
\&\f(CW\*(C`VEOF\*(C'\fR \f(CW\*(C`VEOL\*(C'\fR \f(CW\*(C`VERASE\*(C'\fR \f(CW\*(C`VINTR\*(C'\fR \f(CW\*(C`VKILL\*(C'\fR \f(CW\*(C`VQUIT\*(C'\fR \f(CW\*(C`VSUSP\*(C'\fR \f(CW\*(C`VSTART\*(C'\fR \f(CW\*(C`VSTOP\*(C'\fR \f(CW\*(C`VMIN\*(C'\fR \f(CW\*(C`VTIME\*(C'\fR \f(CW\*(C`NCCS\*(C'\fR
.ie n .IP """c_cflag"" field values" 8
.el .IP "\f(CWc_cflag\fR field values" 8
.IX Item "c_cflag field values"
\&\f(CW\*(C`CLOCAL\*(C'\fR \f(CW\*(C`CREAD\*(C'\fR \f(CW\*(C`CSIZE\*(C'\fR \f(CW\*(C`CS5\*(C'\fR \f(CW\*(C`CS6\*(C'\fR \f(CW\*(C`CS7\*(C'\fR \f(CW\*(C`CS8\*(C'\fR \f(CW\*(C`CSTOPB\*(C'\fR \f(CW\*(C`HUPCL\*(C'\fR \f(CW\*(C`PARENB\*(C'\fR \f(CW\*(C`PARODD\*(C'\fR
.ie n .IP """c_iflag"" field values" 8
.el .IP "\f(CWc_iflag\fR field values" 8
.IX Item "c_iflag field values"
\&\f(CW\*(C`BRKINT\*(C'\fR \f(CW\*(C`ICRNL\*(C'\fR \f(CW\*(C`IGNBRK\*(C'\fR \f(CW\*(C`IGNCR\*(C'\fR \f(CW\*(C`IGNPAR\*(C'\fR \f(CW\*(C`INLCR\*(C'\fR \f(CW\*(C`INPCK\*(C'\fR \f(CW\*(C`ISTRIP\*(C'\fR \f(CW\*(C`IXOFF\*(C'\fR \f(CW\*(C`IXON\*(C'\fR \f(CW\*(C`PARMRK\*(C'\fR
.ie n .IP """c_lflag"" field values" 8
.el .IP "\f(CWc_lflag\fR field values" 8
.IX Item "c_lflag field values"
\&\f(CW\*(C`ECHO\*(C'\fR \f(CW\*(C`ECHOE\*(C'\fR \f(CW\*(C`ECHOK\*(C'\fR \f(CW\*(C`ECHONL\*(C'\fR \f(CW\*(C`ICANON\*(C'\fR \f(CW\*(C`IEXTEN\*(C'\fR \f(CW\*(C`ISIG\*(C'\fR \f(CW\*(C`NOFLSH\*(C'\fR \f(CW\*(C`TOSTOP\*(C'\fR
.ie n .IP """c_oflag"" field values" 8
.el .IP "\f(CWc_oflag\fR field values" 8
.IX Item "c_oflag field values"
\&\f(CW\*(C`OPOST\*(C'\fR
.SH "PATHNAME CONSTANTS"
.IX Header "PATHNAME CONSTANTS"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`_PC_CHOWN_RESTRICTED\*(C'\fR \f(CW\*(C`_PC_LINK_MAX\*(C'\fR \f(CW\*(C`_PC_MAX_CANON\*(C'\fR \f(CW\*(C`_PC_MAX_INPUT\*(C'\fR \f(CW\*(C`_PC_NAME_MAX\*(C'\fR
\&\f(CW\*(C`_PC_NO_TRUNC\*(C'\fR \f(CW\*(C`_PC_PATH_MAX\*(C'\fR \f(CW\*(C`_PC_PIPE_BUF\*(C'\fR \f(CW\*(C`_PC_VDISABLE\*(C'\fR
.SH "POSIX CONSTANTS"
.IX Header "POSIX CONSTANTS"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`_POSIX_ARG_MAX\*(C'\fR \f(CW\*(C`_POSIX_CHILD_MAX\*(C'\fR \f(CW\*(C`_POSIX_CHOWN_RESTRICTED\*(C'\fR \f(CW\*(C`_POSIX_JOB_CONTROL\*(C'\fR
\&\f(CW\*(C`_POSIX_LINK_MAX\*(C'\fR \f(CW\*(C`_POSIX_MAX_CANON\*(C'\fR \f(CW\*(C`_POSIX_MAX_INPUT\*(C'\fR \f(CW\*(C`_POSIX_NAME_MAX\*(C'\fR
\&\f(CW\*(C`_POSIX_NGROUPS_MAX\*(C'\fR \f(CW\*(C`_POSIX_NO_TRUNC\*(C'\fR \f(CW\*(C`_POSIX_OPEN_MAX\*(C'\fR \f(CW\*(C`_POSIX_PATH_MAX\*(C'\fR
\&\f(CW\*(C`_POSIX_PIPE_BUF\*(C'\fR \f(CW\*(C`_POSIX_SAVED_IDS\*(C'\fR \f(CW\*(C`_POSIX_SSIZE_MAX\*(C'\fR \f(CW\*(C`_POSIX_STREAM_MAX\*(C'\fR
\&\f(CW\*(C`_POSIX_TZNAME_MAX\*(C'\fR \f(CW\*(C`_POSIX_VDISABLE\*(C'\fR \f(CW\*(C`_POSIX_VERSION\*(C'\fR
.SH "RESOURCE CONSTANTS"
.IX Header "RESOURCE CONSTANTS"
Imported with the \f(CW\*(C`:sys_resource_h\*(C'\fR tag.
.IP Constants 8
.IX Item "Constants"
Added in Perl v5.28:
.Sp
\&\f(CW\*(C`PRIO_PROCESS\*(C'\fR \f(CW\*(C`PRIO_PGRP\*(C'\fR \f(CW\*(C`PRIO_USER\*(C'\fR
.SH "SYSTEM CONFIGURATION"
.IX Header "SYSTEM CONFIGURATION"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`_SC_ARG_MAX\*(C'\fR \f(CW\*(C`_SC_CHILD_MAX\*(C'\fR \f(CW\*(C`_SC_CLK_TCK\*(C'\fR \f(CW\*(C`_SC_JOB_CONTROL\*(C'\fR \f(CW\*(C`_SC_NGROUPS_MAX\*(C'\fR
\&\f(CW\*(C`_SC_OPEN_MAX\*(C'\fR \f(CW\*(C`_SC_PAGESIZE\*(C'\fR \f(CW\*(C`_SC_SAVED_IDS\*(C'\fR \f(CW\*(C`_SC_STREAM_MAX\*(C'\fR \f(CW\*(C`_SC_TZNAME_MAX\*(C'\fR
\&\f(CW\*(C`_SC_VERSION\*(C'\fR
.SH ERRNO
.IX Header "ERRNO"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`E2BIG\*(C'\fR \f(CW\*(C`EACCES\*(C'\fR \f(CW\*(C`EADDRINUSE\*(C'\fR \f(CW\*(C`EADDRNOTAVAIL\*(C'\fR \f(CW\*(C`EAFNOSUPPORT\*(C'\fR \f(CW\*(C`EAGAIN\*(C'\fR \f(CW\*(C`EALREADY\*(C'\fR \f(CW\*(C`EBADF\*(C'\fR \f(CW\*(C`EBADMSG\*(C'\fR
\&\f(CW\*(C`EBUSY\*(C'\fR \f(CW\*(C`ECANCELED\*(C'\fR \f(CW\*(C`ECHILD\*(C'\fR \f(CW\*(C`ECONNABORTED\*(C'\fR \f(CW\*(C`ECONNREFUSED\*(C'\fR \f(CW\*(C`ECONNRESET\*(C'\fR \f(CW\*(C`EDEADLK\*(C'\fR \f(CW\*(C`EDESTADDRREQ\*(C'\fR
\&\f(CW\*(C`EDOM\*(C'\fR \f(CW\*(C`EDQUOT\*(C'\fR \f(CW\*(C`EEXIST\*(C'\fR \f(CW\*(C`EFAULT\*(C'\fR \f(CW\*(C`EFBIG\*(C'\fR \f(CW\*(C`EHOSTDOWN\*(C'\fR \f(CW\*(C`EHOSTUNREACH\*(C'\fR \f(CW\*(C`EIDRM\*(C'\fR \f(CW\*(C`EILSEQ\*(C'\fR \f(CW\*(C`EINPROGRESS\*(C'\fR
\&\f(CW\*(C`EINTR\*(C'\fR \f(CW\*(C`EINVAL\*(C'\fR \f(CW\*(C`EIO\*(C'\fR \f(CW\*(C`EISCONN\*(C'\fR \f(CW\*(C`EISDIR\*(C'\fR \f(CW\*(C`ELOOP\*(C'\fR \f(CW\*(C`EMFILE\*(C'\fR \f(CW\*(C`EMLINK\*(C'\fR \f(CW\*(C`EMSGSIZE\*(C'\fR \f(CW\*(C`ENAMETOOLONG\*(C'\fR
\&\f(CW\*(C`ENETDOWN\*(C'\fR \f(CW\*(C`ENETRESET\*(C'\fR \f(CW\*(C`ENETUNREACH\*(C'\fR \f(CW\*(C`ENFILE\*(C'\fR \f(CW\*(C`ENOBUFS\*(C'\fR \f(CW\*(C`ENODATA\*(C'\fR \f(CW\*(C`ENODEV\*(C'\fR \f(CW\*(C`ENOENT\*(C'\fR \f(CW\*(C`ENOEXEC\*(C'\fR
\&\f(CW\*(C`ENOLCK\*(C'\fR \f(CW\*(C`ENOLINK\*(C'\fR \f(CW\*(C`ENOMEM\*(C'\fR \f(CW\*(C`ENOMSG\*(C'\fR \f(CW\*(C`ENOPROTOOPT\*(C'\fR \f(CW\*(C`ENOSPC\*(C'\fR \f(CW\*(C`ENOSR\*(C'\fR \f(CW\*(C`ENOSTR\*(C'\fR \f(CW\*(C`ENOSYS\*(C'\fR \f(CW\*(C`ENOTBLK\*(C'\fR
\&\f(CW\*(C`ENOTCONN\*(C'\fR \f(CW\*(C`ENOTDIR\*(C'\fR \f(CW\*(C`ENOTEMPTY\*(C'\fR \f(CW\*(C`ENOTRECOVERABLE\*(C'\fR \f(CW\*(C`ENOTSOCK\*(C'\fR \f(CW\*(C`ENOTSUP\*(C'\fR \f(CW\*(C`ENOTTY\*(C'\fR \f(CW\*(C`ENXIO\*(C'\fR
\&\f(CW\*(C`EOPNOTSUPP\*(C'\fR \f(CW\*(C`EOTHER\*(C'\fR \f(CW\*(C`EOVERFLOW\*(C'\fR \f(CW\*(C`EOWNERDEAD\*(C'\fR \f(CW\*(C`EPERM\*(C'\fR \f(CW\*(C`EPFNOSUPPORT\*(C'\fR \f(CW\*(C`EPIPE\*(C'\fR \f(CW\*(C`EPROCLIM\*(C'\fR \f(CW\*(C`EPROTO\*(C'\fR
\&\f(CW\*(C`EPROTONOSUPPORT\*(C'\fR \f(CW\*(C`EPROTOTYPE\*(C'\fR \f(CW\*(C`ERANGE\*(C'\fR \f(CW\*(C`EREMOTE\*(C'\fR \f(CW\*(C`ERESTART\*(C'\fR \f(CW\*(C`EROFS\*(C'\fR \f(CW\*(C`ESHUTDOWN\*(C'\fR
\&\f(CW\*(C`ESOCKTNOSUPPORT\*(C'\fR \f(CW\*(C`ESPIPE\*(C'\fR \f(CW\*(C`ESRCH\*(C'\fR \f(CW\*(C`ESTALE\*(C'\fR \f(CW\*(C`ETIME\*(C'\fR \f(CW\*(C`ETIMEDOUT\*(C'\fR \f(CW\*(C`ETOOMANYREFS\*(C'\fR \f(CW\*(C`ETXTBSY\*(C'\fR \f(CW\*(C`EUSERS\*(C'\fR
\&\f(CW\*(C`EWOULDBLOCK\*(C'\fR \f(CW\*(C`EXDEV\*(C'\fR
.SH FCNTL
.IX Header "FCNTL"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`FD_CLOEXEC\*(C'\fR \f(CW\*(C`F_DUPFD\*(C'\fR \f(CW\*(C`F_GETFD\*(C'\fR \f(CW\*(C`F_GETFL\*(C'\fR \f(CW\*(C`F_GETLK\*(C'\fR \f(CW\*(C`F_OK\*(C'\fR \f(CW\*(C`F_RDLCK\*(C'\fR \f(CW\*(C`F_SETFD\*(C'\fR \f(CW\*(C`F_SETFL\*(C'\fR \f(CW\*(C`F_SETLK\*(C'\fR
\&\f(CW\*(C`F_SETLKW\*(C'\fR \f(CW\*(C`F_UNLCK\*(C'\fR \f(CW\*(C`F_WRLCK\*(C'\fR \f(CW\*(C`O_ACCMODE\*(C'\fR \f(CW\*(C`O_APPEND\*(C'\fR \f(CW\*(C`O_CREAT\*(C'\fR \f(CW\*(C`O_EXCL\*(C'\fR \f(CW\*(C`O_NOCTTY\*(C'\fR \f(CW\*(C`O_NONBLOCK\*(C'\fR
\&\f(CW\*(C`O_RDONLY\*(C'\fR \f(CW\*(C`O_RDWR\*(C'\fR \f(CW\*(C`O_TRUNC\*(C'\fR \f(CW\*(C`O_WRONLY\*(C'\fR
.SH FLOAT
.IX Header "FLOAT"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`DBL_DIG\*(C'\fR \f(CW\*(C`DBL_EPSILON\*(C'\fR \f(CW\*(C`DBL_MANT_DIG\*(C'\fR \f(CW\*(C`DBL_MAX\*(C'\fR \f(CW\*(C`DBL_MAX_10_EXP\*(C'\fR \f(CW\*(C`DBL_MAX_EXP\*(C'\fR \f(CW\*(C`DBL_MIN\*(C'\fR
\&\f(CW\*(C`DBL_MIN_10_EXP\*(C'\fR \f(CW\*(C`DBL_MIN_EXP\*(C'\fR \f(CW\*(C`FLT_DIG\*(C'\fR \f(CW\*(C`FLT_EPSILON\*(C'\fR \f(CW\*(C`FLT_MANT_DIG\*(C'\fR \f(CW\*(C`FLT_MAX\*(C'\fR
\&\f(CW\*(C`FLT_MAX_10_EXP\*(C'\fR \f(CW\*(C`FLT_MAX_EXP\*(C'\fR \f(CW\*(C`FLT_MIN\*(C'\fR \f(CW\*(C`FLT_MIN_10_EXP\*(C'\fR \f(CW\*(C`FLT_MIN_EXP\*(C'\fR \f(CW\*(C`FLT_RADIX\*(C'\fR
\&\f(CW\*(C`FLT_ROUNDS\*(C'\fR \f(CW\*(C`LDBL_DIG\*(C'\fR \f(CW\*(C`LDBL_EPSILON\*(C'\fR \f(CW\*(C`LDBL_MANT_DIG\*(C'\fR \f(CW\*(C`LDBL_MAX\*(C'\fR \f(CW\*(C`LDBL_MAX_10_EXP\*(C'\fR
\&\f(CW\*(C`LDBL_MAX_EXP\*(C'\fR \f(CW\*(C`LDBL_MIN\*(C'\fR \f(CW\*(C`LDBL_MIN_10_EXP\*(C'\fR \f(CW\*(C`LDBL_MIN_EXP\*(C'\fR
.SH "FLOATING-POINT ENVIRONMENT"
.IX Header "FLOATING-POINT ENVIRONMENT"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`FE_DOWNWARD\*(C'\fR \f(CW\*(C`FE_TONEAREST\*(C'\fR \f(CW\*(C`FE_TOWARDZERO\*(C'\fR \f(CW\*(C`FE_UPWARD\*(C'\fR
on systems that support them.
.SH LIMITS
.IX Header "LIMITS"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`ARG_MAX\*(C'\fR \f(CW\*(C`CHAR_BIT\*(C'\fR \f(CW\*(C`CHAR_MAX\*(C'\fR \f(CW\*(C`CHAR_MIN\*(C'\fR \f(CW\*(C`CHILD_MAX\*(C'\fR \f(CW\*(C`INT_MAX\*(C'\fR \f(CW\*(C`INT_MIN\*(C'\fR \f(CW\*(C`LINK_MAX\*(C'\fR \f(CW\*(C`LONG_MAX\*(C'\fR
\&\f(CW\*(C`LONG_MIN\*(C'\fR \f(CW\*(C`MAX_CANON\*(C'\fR \f(CW\*(C`MAX_INPUT\*(C'\fR \f(CW\*(C`MB_LEN_MAX\*(C'\fR \f(CW\*(C`NAME_MAX\*(C'\fR \f(CW\*(C`NGROUPS_MAX\*(C'\fR \f(CW\*(C`OPEN_MAX\*(C'\fR \f(CW\*(C`PATH_MAX\*(C'\fR
\&\f(CW\*(C`PIPE_BUF\*(C'\fR \f(CW\*(C`SCHAR_MAX\*(C'\fR \f(CW\*(C`SCHAR_MIN\*(C'\fR \f(CW\*(C`SHRT_MAX\*(C'\fR \f(CW\*(C`SHRT_MIN\*(C'\fR \f(CW\*(C`SSIZE_MAX\*(C'\fR \f(CW\*(C`STREAM_MAX\*(C'\fR \f(CW\*(C`TZNAME_MAX\*(C'\fR
\&\f(CW\*(C`UCHAR_MAX\*(C'\fR \f(CW\*(C`UINT_MAX\*(C'\fR \f(CW\*(C`ULONG_MAX\*(C'\fR \f(CW\*(C`USHRT_MAX\*(C'\fR
.SH LOCALE
.IX Header "LOCALE"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`LC_ALL\*(C'\fR \f(CW\*(C`LC_COLLATE\*(C'\fR \f(CW\*(C`LC_CTYPE\*(C'\fR \f(CW\*(C`LC_MONETARY\*(C'\fR \f(CW\*(C`LC_NUMERIC\*(C'\fR \f(CW\*(C`LC_TIME\*(C'\fR \f(CW\*(C`LC_MESSAGES\*(C'\fR
on systems that support them.
.SH MATH
.IX Header "MATH"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`HUGE_VAL\*(C'\fR
.Sp
Added in Perl v5.22:
.Sp
\&\f(CW\*(C`FP_ILOGB0\*(C'\fR \f(CW\*(C`FP_ILOGBNAN\*(C'\fR \f(CW\*(C`FP_INFINITE\*(C'\fR \f(CW\*(C`FP_NAN\*(C'\fR \f(CW\*(C`FP_NORMAL\*(C'\fR \f(CW\*(C`FP_SUBNORMAL\*(C'\fR \f(CW\*(C`FP_ZERO\*(C'\fR
\&\f(CW\*(C`INFINITY\*(C'\fR \f(CW\*(C`NAN\*(C'\fR \f(CW\*(C`Inf\*(C'\fR \f(CW\*(C`NaN\*(C'\fR
\&\f(CW\*(C`M_1_PI\*(C'\fR \f(CW\*(C`M_2_PI\*(C'\fR \f(CW\*(C`M_2_SQRTPI\*(C'\fR \f(CW\*(C`M_E\*(C'\fR \f(CW\*(C`M_LN10\*(C'\fR \f(CW\*(C`M_LN2\*(C'\fR \f(CW\*(C`M_LOG10E\*(C'\fR \f(CW\*(C`M_LOG2E\*(C'\fR \f(CW\*(C`M_PI\*(C'\fR
\&\f(CW\*(C`M_PI_2\*(C'\fR \f(CW\*(C`M_PI_4\*(C'\fR \f(CW\*(C`M_SQRT1_2\*(C'\fR \f(CW\*(C`M_SQRT2\*(C'\fR
on systems with C99 support.
.SH SIGNAL
.IX Header "SIGNAL"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`SA_NOCLDSTOP\*(C'\fR \f(CW\*(C`SA_NOCLDWAIT\*(C'\fR \f(CW\*(C`SA_NODEFER\*(C'\fR \f(CW\*(C`SA_ONSTACK\*(C'\fR \f(CW\*(C`SA_RESETHAND\*(C'\fR \f(CW\*(C`SA_RESTART\*(C'\fR
\&\f(CW\*(C`SA_SIGINFO\*(C'\fR \f(CW\*(C`SIGABRT\*(C'\fR \f(CW\*(C`SIGALRM\*(C'\fR \f(CW\*(C`SIGCHLD\*(C'\fR \f(CW\*(C`SIGCONT\*(C'\fR \f(CW\*(C`SIGFPE\*(C'\fR \f(CW\*(C`SIGHUP\*(C'\fR \f(CW\*(C`SIGILL\*(C'\fR \f(CW\*(C`SIGINT\*(C'\fR
\&\f(CW\*(C`SIGKILL\*(C'\fR \f(CW\*(C`SIGPIPE\*(C'\fR \f(CW\*(C`SIGQUIT\*(C'\fR \f(CW\*(C`SIGSEGV\*(C'\fR \f(CW\*(C`SIGSTOP\*(C'\fR \f(CW\*(C`SIGTERM\*(C'\fR \f(CW\*(C`SIGTSTP\*(C'\fR \f(CW\*(C`SIGTTIN\*(C'\fR \f(CW\*(C`SIGTTOU\*(C'\fR
\&\f(CW\*(C`SIGUSR1\*(C'\fR \f(CW\*(C`SIGUSR2\*(C'\fR \f(CW\*(C`SIG_BLOCK\*(C'\fR \f(CW\*(C`SIG_DFL\*(C'\fR \f(CW\*(C`SIG_ERR\*(C'\fR \f(CW\*(C`SIG_IGN\*(C'\fR \f(CW\*(C`SIG_SETMASK\*(C'\fR
\&\f(CW\*(C`SIG_UNBLOCK\*(C'\fR
.Sp
Added in Perl v5.24:
.Sp
\&\f(CW\*(C`ILL_ILLOPC\*(C'\fR \f(CW\*(C`ILL_ILLOPN\*(C'\fR \f(CW\*(C`ILL_ILLADR\*(C'\fR \f(CW\*(C`ILL_ILLTRP\*(C'\fR \f(CW\*(C`ILL_PRVOPC\*(C'\fR \f(CW\*(C`ILL_PRVREG\*(C'\fR \f(CW\*(C`ILL_COPROC\*(C'\fR
\&\f(CW\*(C`ILL_BADSTK\*(C'\fR \f(CW\*(C`FPE_INTDIV\*(C'\fR \f(CW\*(C`FPE_INTOVF\*(C'\fR \f(CW\*(C`FPE_FLTDIV\*(C'\fR \f(CW\*(C`FPE_FLTOVF\*(C'\fR \f(CW\*(C`FPE_FLTUND\*(C'\fR \f(CW\*(C`FPE_FLTRES\*(C'\fR
\&\f(CW\*(C`FPE_FLTINV\*(C'\fR \f(CW\*(C`FPE_FLTSUB\*(C'\fR \f(CW\*(C`SEGV_MAPERR\*(C'\fR \f(CW\*(C`SEGV_ACCERR\*(C'\fR \f(CW\*(C`BUS_ADRALN\*(C'\fR \f(CW\*(C`BUS_ADRERR\*(C'\fR
\&\f(CW\*(C`BUS_OBJERR\*(C'\fR \f(CW\*(C`TRAP_BRKPT\*(C'\fR \f(CW\*(C`TRAP_TRACE\*(C'\fR \f(CW\*(C`CLD_EXITED\*(C'\fR \f(CW\*(C`CLD_KILLED\*(C'\fR \f(CW\*(C`CLD_DUMPED\*(C'\fR \f(CW\*(C`CLD_TRAPPED\*(C'\fR
\&\f(CW\*(C`CLD_STOPPED\*(C'\fR \f(CW\*(C`CLD_CONTINUED\*(C'\fR \f(CW\*(C`POLL_IN\*(C'\fR \f(CW\*(C`POLL_OUT\*(C'\fR \f(CW\*(C`POLL_MSG\*(C'\fR \f(CW\*(C`POLL_ERR\*(C'\fR \f(CW\*(C`POLL_PRI\*(C'\fR
\&\f(CW\*(C`POLL_HUP\*(C'\fR \f(CW\*(C`SI_USER\*(C'\fR \f(CW\*(C`SI_QUEUE\*(C'\fR \f(CW\*(C`SI_TIMER\*(C'\fR \f(CW\*(C`SI_ASYNCIO\*(C'\fR \f(CW\*(C`SI_MESGQ\*(C'\fR
.SH STAT
.IX Header "STAT"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`S_IRGRP\*(C'\fR \f(CW\*(C`S_IROTH\*(C'\fR \f(CW\*(C`S_IRUSR\*(C'\fR \f(CW\*(C`S_IRWXG\*(C'\fR \f(CW\*(C`S_IRWXO\*(C'\fR \f(CW\*(C`S_IRWXU\*(C'\fR \f(CW\*(C`S_ISGID\*(C'\fR \f(CW\*(C`S_ISUID\*(C'\fR \f(CW\*(C`S_IWGRP\*(C'\fR \f(CW\*(C`S_IWOTH\*(C'\fR
\&\f(CW\*(C`S_IWUSR\*(C'\fR \f(CW\*(C`S_IXGRP\*(C'\fR \f(CW\*(C`S_IXOTH\*(C'\fR \f(CW\*(C`S_IXUSR\*(C'\fR
.IP Macros 8
.IX Item "Macros"
\&\f(CW\*(C`S_ISBLK\*(C'\fR \f(CW\*(C`S_ISCHR\*(C'\fR \f(CW\*(C`S_ISDIR\*(C'\fR \f(CW\*(C`S_ISFIFO\*(C'\fR \f(CW\*(C`S_ISLNK\*(C'\fR \f(CW\*(C`S_ISREG\*(C'\fR \f(CW\*(C`S_ISSOCK\*(C'\fR
.SH STDLIB
.IX Header "STDLIB"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`EXIT_FAILURE\*(C'\fR \f(CW\*(C`EXIT_SUCCESS\*(C'\fR \f(CW\*(C`MB_CUR_MAX\*(C'\fR \f(CW\*(C`RAND_MAX\*(C'\fR
.SH STDIO
.IX Header "STDIO"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`BUFSIZ\*(C'\fR \f(CW\*(C`EOF\*(C'\fR \f(CW\*(C`FILENAME_MAX\*(C'\fR \f(CW\*(C`L_ctermid\*(C'\fR \f(CW\*(C`L_cuserid\*(C'\fR \f(CW\*(C`TMP_MAX\*(C'\fR
.SH TIME
.IX Header "TIME"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`CLK_TCK\*(C'\fR \f(CW\*(C`CLOCKS_PER_SEC\*(C'\fR
.SH UNISTD
.IX Header "UNISTD"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`R_OK\*(C'\fR \f(CW\*(C`SEEK_CUR\*(C'\fR \f(CW\*(C`SEEK_END\*(C'\fR \f(CW\*(C`SEEK_SET\*(C'\fR \f(CW\*(C`STDIN_FILENO\*(C'\fR \f(CW\*(C`STDOUT_FILENO\*(C'\fR \f(CW\*(C`STDERR_FILENO\*(C'\fR \f(CW\*(C`W_OK\*(C'\fR \f(CW\*(C`X_OK\*(C'\fR
.SH WAIT
.IX Header "WAIT"
.IP Constants 8
.IX Item "Constants"
\&\f(CW\*(C`WNOHANG\*(C'\fR \f(CW\*(C`WUNTRACED\*(C'\fR
.RS 8
.ie n .IP """WNOHANG""" 16
.el .IP \f(CWWNOHANG\fR 16
.IX Item "WNOHANG"
Do not suspend the calling process until a child process
changes state but instead return immediately.
.ie n .IP """WUNTRACED""" 16
.el .IP \f(CWWUNTRACED\fR 16
.IX Item "WUNTRACED"
Catch stopped child processes.
.RE
.RS 8
.RE
.IP Macros 8
.IX Item "Macros"
\&\f(CW\*(C`WIFEXITED\*(C'\fR \f(CW\*(C`WEXITSTATUS\*(C'\fR \f(CW\*(C`WIFSIGNALED\*(C'\fR \f(CW\*(C`WTERMSIG\*(C'\fR \f(CW\*(C`WIFSTOPPED\*(C'\fR \f(CW\*(C`WSTOPSIG\*(C'\fR
.RS 8
.ie n .IP """WIFEXITED""" 16
.el .IP \f(CWWIFEXITED\fR 16
.IX Item "WIFEXITED"
\&\f(CWWIFEXITED(${^CHILD_ERROR_NATIVE})\fR returns true if the child process
exited normally (\f(CWexit()\fR or by falling off the end of \f(CWmain()\fR)
.ie n .IP """WEXITSTATUS""" 16
.el .IP \f(CWWEXITSTATUS\fR 16
.IX Item "WEXITSTATUS"
\&\f(CWWEXITSTATUS(${^CHILD_ERROR_NATIVE})\fR returns the normal exit status of
the child process (only meaningful if \f(CWWIFEXITED(${^CHILD_ERROR_NATIVE})\fR
is true)
.ie n .IP """WIFSIGNALED""" 16
.el .IP \f(CWWIFSIGNALED\fR 16
.IX Item "WIFSIGNALED"
\&\f(CWWIFSIGNALED(${^CHILD_ERROR_NATIVE})\fR returns true if the child process
terminated because of a signal
.ie n .IP """WTERMSIG""" 16
.el .IP \f(CWWTERMSIG\fR 16
.IX Item "WTERMSIG"
\&\f(CWWTERMSIG(${^CHILD_ERROR_NATIVE})\fR returns the signal the child process
terminated for (only meaningful if
\&\f(CWWIFSIGNALED(${^CHILD_ERROR_NATIVE})\fR
is true)
.ie n .IP """WIFSTOPPED""" 16
.el .IP \f(CWWIFSTOPPED\fR 16
.IX Item "WIFSTOPPED"
\&\f(CWWIFSTOPPED(${^CHILD_ERROR_NATIVE})\fR returns true if the child process is
currently stopped (can happen only if you specified the WUNTRACED flag
to \f(CWwaitpid()\fR)
.ie n .IP """WSTOPSIG""" 16
.el .IP \f(CWWSTOPSIG\fR 16
.IX Item "WSTOPSIG"
\&\f(CWWSTOPSIG(${^CHILD_ERROR_NATIVE})\fR returns the signal the child process
was stopped for (only meaningful if
\&\f(CWWIFSTOPPED(${^CHILD_ERROR_NATIVE})\fR
is true)
.RE
.RS 8
.RE
.SH WINSOCK
.IX Header "WINSOCK"
(Windows only.)
.IP Constants 8
.IX Item "Constants"
Added in Perl v5.24:
.Sp
\&\f(CW\*(C`WSAEINTR\*(C'\fR \f(CW\*(C`WSAEBADF\*(C'\fR \f(CW\*(C`WSAEACCES\*(C'\fR \f(CW\*(C`WSAEFAULT\*(C'\fR \f(CW\*(C`WSAEINVAL\*(C'\fR \f(CW\*(C`WSAEMFILE\*(C'\fR \f(CW\*(C`WSAEWOULDBLOCK\*(C'\fR
\&\f(CW\*(C`WSAEINPROGRESS\*(C'\fR \f(CW\*(C`WSAEALREADY\*(C'\fR \f(CW\*(C`WSAENOTSOCK\*(C'\fR \f(CW\*(C`WSAEDESTADDRREQ\*(C'\fR \f(CW\*(C`WSAEMSGSIZE\*(C'\fR
\&\f(CW\*(C`WSAEPROTOTYPE\*(C'\fR \f(CW\*(C`WSAENOPROTOOPT\*(C'\fR \f(CW\*(C`WSAEPROTONOSUPPORT\*(C'\fR \f(CW\*(C`WSAESOCKTNOSUPPORT\*(C'\fR
\&\f(CW\*(C`WSAEOPNOTSUPP\*(C'\fR \f(CW\*(C`WSAEPFNOSUPPORT\*(C'\fR \f(CW\*(C`WSAEAFNOSUPPORT\*(C'\fR \f(CW\*(C`WSAEADDRINUSE\*(C'\fR
\&\f(CW\*(C`WSAEADDRNOTAVAIL\*(C'\fR \f(CW\*(C`WSAENETDOWN\*(C'\fR \f(CW\*(C`WSAENETUNREACH\*(C'\fR \f(CW\*(C`WSAENETRESET\*(C'\fR \f(CW\*(C`WSAECONNABORTED\*(C'\fR
\&\f(CW\*(C`WSAECONNRESET\*(C'\fR \f(CW\*(C`WSAENOBUFS\*(C'\fR \f(CW\*(C`WSAEISCONN\*(C'\fR \f(CW\*(C`WSAENOTCONN\*(C'\fR \f(CW\*(C`WSAESHUTDOWN\*(C'\fR
\&\f(CW\*(C`WSAETOOMANYREFS\*(C'\fR \f(CW\*(C`WSAETIMEDOUT\*(C'\fR \f(CW\*(C`WSAECONNREFUSED\*(C'\fR \f(CW\*(C`WSAELOOP\*(C'\fR \f(CW\*(C`WSAENAMETOOLONG\*(C'\fR
\&\f(CW\*(C`WSAEHOSTDOWN\*(C'\fR \f(CW\*(C`WSAEHOSTUNREACH\*(C'\fR \f(CW\*(C`WSAENOTEMPTY\*(C'\fR \f(CW\*(C`WSAEPROCLIM\*(C'\fR \f(CW\*(C`WSAEUSERS\*(C'\fR
\&\f(CW\*(C`WSAEDQUOT\*(C'\fR \f(CW\*(C`WSAESTALE\*(C'\fR \f(CW\*(C`WSAEREMOTE\*(C'\fR \f(CW\*(C`WSAEDISCON\*(C'\fR \f(CW\*(C`WSAENOMORE\*(C'\fR \f(CW\*(C`WSAECANCELLED\*(C'\fR
\&\f(CW\*(C`WSAEINVALIDPROCTABLE\*(C'\fR \f(CW\*(C`WSAEINVALIDPROVIDER\*(C'\fR \f(CW\*(C`WSAEPROVIDERFAILEDINIT\*(C'\fR
\&\f(CW\*(C`WSAEREFUSED\*(C'\fR
|