Debian Codegraph @

upstream/opensuse-tumbleweed/man3/POSIX.3pm

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "POSIX 3pm"
61 .TH POSIX 3pm 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 POSIX \- Perl interface to IEEE Std 1003.1
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 3
71 \& use POSIX ();
72 \& use POSIX qw(setsid);
73 \& use POSIX qw(:errno_h :fcntl_h);
74 \&
75 \& printf "EINTR is %d\en", EINTR;
76 \&
77 \& my $sess_id = POSIX::setsid();
78 \&
79 \& my $fd = POSIX::open($path, O_CREAT|O_EXCL|O_WRONLY, 0644);
80 \& # note: that\*(Aqs a filedescriptor, *NOT* a filehandle
81 .Ve
82 .SH DESCRIPTION
83 .IX Header "DESCRIPTION"
84 The POSIX module permits you to access all (or nearly all) the standard
85 POSIX 1003.1 identifiers. Many of these identifiers have been given Perl\-ish
86 interfaces.
87 .PP
88 This document gives a condensed list of the features available in the POSIX
89 module. Consult your operating system\*(Aqs manpages for general information on
90 most features. Consult perlfunc for functions which are noted as being
91 identical or almost identical to Perl\*(Aqs builtin functions.
92 .PP
93 The first section describes POSIX functions from the 1003.1 specification.
94 The second section describes some classes for signal objects, TTY objects,
95 and other miscellaneous objects. The remaining sections list various
96 constants and macros in an organization which roughly follows IEEE Std
97 1003.1b\-1993.
98 .PP
99 The notation \f(CW\*(C`[C99]\*(C'\fR indicates functions that were added in the ISO/IEC
100 9899:1999 version of the C language standard. Some may not be available
101 on your system if it adheres to an earlier standard. Attempts to use
102 any missing one will result in a fatal runtime error message.
103 .SH CAVEATS
104 .IX Header "CAVEATS"
105 \&\fIEverything is exported by default\fR (with a handful of exceptions).
106 This is an unfortunate backwards compatibility feature and its use is
107 \&\fBstrongly discouraged\fR.
108 You should either prevent the exporting (by saying \f(CW\*(C`use\ POSIX\ ();\*(C'\fR,
109 as usual) and then use fully qualified names (e.g. \f(CW\*(C`POSIX::SEEK_END\*(C'\fR),
110 or give an explicit import list.
111 If you do neither and opt for the default (as in \f(CW\*(C`use\ POSIX;\*(C'\fR), you
112 will import \fIhundreds and hundreds\fR of symbols into your namespace.
113 .PP
114 A few functions are not implemented because they are C specific. If you
115 attempt to call these, they will print a message telling you that they
116 aren\*(Aqt implemented, and suggest using the Perl equivalent, should one
117 exist. For example, trying to access the \f(CWsetjmp()\fR call will elicit the
118 message "\f(CW\*(C`setjmp() is C\-specific: use eval {} instead\*(C'\fR".
119 .PP
120 Furthermore, some evil vendors will claim 1003.1 compliance, but in fact
121 are not so: they will not pass the PCTS (POSIX Compliance Test Suites).
122 For example, one vendor may not define \f(CW\*(C`EDEADLK\*(C'\fR, or the semantics of the
123 errno values set by \f(CWopen(2)\fR might not be quite right. Perl does not
124 attempt to verify POSIX compliance. That means you can currently
125 successfully say "use POSIX", and then later in your program you find
126 that your vendor has been lax and there\*(Aqs no usable \f(CW\*(C`ICANON\*(C'\fR macro after
127 all. This could be construed to be a bug.
128 .SH FUNCTIONS
129 .IX Header "FUNCTIONS"
130 .ie n .IP """_exit""" 8
131 .el .IP \f(CW_exit\fR 8
132 .IX Item "_exit"
133 This is identical to the C function \f(CW_exit()\fR. It exits the program
134 immediately which means among other things buffered I/O is \fBnot\fR flushed.
135 .Sp
136 Note that when using threads and in Linux this is \fBnot\fR a good way to
137 exit a thread because in Linux processes and threads are kind of the
138 same thing (Note: while this is the situation in early 2003 there are
139 projects under way to have threads with more POSIXly semantics in Linux).
140 If you want not to return from a thread, detach the thread.
141 .ie n .IP """abort""" 8
142 .el .IP \f(CWabort\fR 8
143 .IX Item "abort"
144 This is identical to the C function \f(CWabort()\fR. It terminates the
145 process with a \f(CW\*(C`SIGABRT\*(C'\fR signal unless caught by a signal handler or
146 if the handler does not return normally (it e.g. does a \f(CW\*(C`longjmp\*(C'\fR).
147 .ie n .IP """abs""" 8
148 .el .IP \f(CWabs\fR 8
149 .IX Item "abs"
150 This is identical to Perl\*(Aqs builtin \f(CWabs()\fR function, returning the absolute
151 value of its numerical argument (except that \f(CWPOSIX::abs()\fR must be provided
152 an explicit value (rather than relying on an implicit \f(CW$_\fR):
153 .Sp
154 .Vb 1
155 \& $absolute_value = POSIX::abs(42); # good
156 \&
157 \& $absolute_value = POSIX::abs(); # throws exception
158 .Ve
159 .ie n .IP """access""" 8
160 .el .IP \f(CWaccess\fR 8
161 .IX Item "access"
162 Determines the accessibility of a file.
163 .Sp
164 .Vb 3
165 \& if( POSIX::access( "/", &POSIX::R_OK ) ){
166 \& print "have read permission\en";
167 \& }
168 .Ve
169 .Sp
170 Returns \f(CW\*(C`undef\*(C'\fR on failure. Note: do not use \f(CWaccess()\fR for
171 security purposes. Between the \f(CWaccess()\fR call and the operation
172 you are preparing for the permissions might change: a classic
173 \&\fIrace condition\fR.
174 .ie n .IP """acos""" 8
175 .el .IP \f(CWacos\fR 8
176 .IX Item "acos"
177 This is identical to the C function \f(CWacos()\fR, returning
178 the arcus cosine of its numerical argument. See also Math::Trig.
179 .ie n .IP """acosh""" 8
180 .el .IP \f(CWacosh\fR 8
181 .IX Item "acosh"
182 This is identical to the C function \f(CWacosh()\fR, returning the
183 hyperbolic arcus cosine of its numerical argument [C99]. See also
184 Math::Trig. Added in Perl v5.22.
185 .ie n .IP """alarm""" 8
186 .el .IP \f(CWalarm\fR 8
187 .IX Item "alarm"
188 This is identical to Perl\*(Aqs builtin \f(CWalarm()\fR function, either for arming or
189 disarming the \f(CW\*(C`SIGARLM\*(C'\fR timer, except that \f(CWPOSIX::alarm()\fR must be provided
190 an explicit value (rather than relying on an implicit \f(CW$_\fR):
191 .Sp
192 .Vb 1
193 \& POSIX::alarm(3) # good
194 \&
195 \& POSIX::alarm() # throws exception
196 .Ve
197 .ie n .IP """asctime""" 8
198 .el .IP \f(CWasctime\fR 8
199 .IX Item "asctime"
200 This is identical to the C function \f(CWasctime()\fR. It returns
201 a string of the form
202 .Sp
203 .Vb 1
204 \& "Fri Jun 2 18:22:13 2000\en\e0"
205 .Ve
206 .Sp
207 and it is called thusly
208 .Sp
209 .Vb 2
210 \& $asctime = asctime($sec, $min, $hour, $mday, $mon,
211 \& $year, $wday, $yday, $isdst);
212 .Ve
213 .Sp
214 The \f(CW$mon\fR is zero\-based: January equals \f(CW0\fR. The \f(CW$year\fR is
215 1900\-based: 2001 equals \f(CW101\fR. \f(CW$wday\fR and \f(CW$yday\fR default to zero
216 (and are usually ignored anyway), and \f(CW$isdst\fR defaults to \-1.
217 .Sp
218 Note the result is always in English. Use \f(CW"strftime"\fR instead to
219 get a result suitable for the current locale. That function\*(Aqs \f(CW%c\fR
220 format yields the locale\*(Aqs preferred representation.
221 .ie n .IP """asin""" 8
222 .el .IP \f(CWasin\fR 8
223 .IX Item "asin"
224 This is identical to the C function \f(CWasin()\fR, returning
225 the arcus sine of its numerical argument. See also Math::Trig.
226 .ie n .IP """asinh""" 8
227 .el .IP \f(CWasinh\fR 8
228 .IX Item "asinh"
229 This is identical to the C function \f(CWasinh()\fR, returning the
230 hyperbolic arcus sine of its numerical argument [C99]. See also
231 Math::Trig. Added in Perl v5.22.
232 .ie n .IP """assert""" 8
233 .el .IP \f(CWassert\fR 8
234 .IX Item "assert"
235 Unimplemented, but you can use "die" in perlfunc and the Carp module
236 to achieve similar things.
237 .ie n .IP """atan""" 8
238 .el .IP \f(CWatan\fR 8
239 .IX Item "atan"
240 This is identical to the C function \f(CWatan()\fR, returning the
241 arcus tangent of its numerical argument. See also Math::Trig.
242 .ie n .IP """atanh""" 8
243 .el .IP \f(CWatanh\fR 8
244 .IX Item "atanh"
245 This is identical to the C function \f(CWatanh()\fR, returning the
246 hyperbolic arcus tangent of its numerical argument [C99]. See also
247 Math::Trig. Added in Perl v5.22.
248 .ie n .IP """atan2""" 8
249 .el .IP \f(CWatan2\fR 8
250 .IX Item "atan2"
251 This is identical to Perl\*(Aqs builtin \f(CWatan2()\fR function, returning
252 the arcus tangent defined by its two numerical arguments, the \fIy\fR
253 coordinate and the \fIx\fR coordinate. See also Math::Trig.
254 .ie n .IP """atexit""" 8
255 .el .IP \f(CWatexit\fR 8
256 .IX Item "atexit"
257 Not implemented. \f(CWatexit()\fR is C\-specific: use \f(CW\*(C`END {}\*(C'\fR instead, see perlmod.
258 .ie n .IP """atof""" 8
259 .el .IP \f(CWatof\fR 8
260 .IX Item "atof"
261 Not implemented. \f(CWatof()\fR is C\-specific. Perl converts strings to numbers transparently.
262 If you need to force a scalar to a number, add a zero to it.
263 .ie n .IP """atoi""" 8
264 .el .IP \f(CWatoi\fR 8
265 .IX Item "atoi"
266 Not implemented. \f(CWatoi()\fR is C\-specific. Perl converts strings to numbers transparently.
267 If you need to force a scalar to a number, add a zero to it.
268 If you need to have just the integer part, see "int" in perlfunc.
269 .ie n .IP """atol""" 8
270 .el .IP \f(CWatol\fR 8
271 .IX Item "atol"
272 Not implemented. \f(CWatol()\fR is C\-specific. Perl converts strings to numbers transparently.
273 If you need to force a scalar to a number, add a zero to it.
274 If you need to have just the integer part, see "int" in perlfunc.
275 .ie n .IP """bsearch""" 8
276 .el .IP \f(CWbsearch\fR 8
277 .IX Item "bsearch"
278 \&\f(CWbsearch()\fR not supplied. For doing binary search on wordlists,
279 see Search::Dict.
280 .ie n .IP """calloc""" 8
281 .el .IP \f(CWcalloc\fR 8
282 .IX Item "calloc"
283 Not implemented. \f(CWcalloc()\fR is C\-specific. Perl does memory management transparently.
284 .ie n .IP """cbrt""" 8
285 .el .IP \f(CWcbrt\fR 8
286 .IX Item "cbrt"
287 The cube root [C99]. Added in Perl v5.22.
288 .ie n .IP """ceil""" 8
289 .el .IP \f(CWceil\fR 8
290 .IX Item "ceil"
291 This is identical to the C function \f(CWceil()\fR, returning the smallest
292 integer value greater than or equal to the given numerical argument.
293 .ie n .IP """chdir""" 8
294 .el .IP \f(CWchdir\fR 8
295 .IX Item "chdir"
296 This is identical to Perl\*(Aqs builtin \f(CWchdir()\fR function, allowing one to
297 change the working (default) directory \-\- see "chdir" in perlfunc \-\- with the
298 exception that \f(CWPOSIX::chdir()\fR must be provided an explicit value (rather
299 than relying on an implicit \f(CW$_\fR):
300 .Sp
301 .Vb 1
302 \& $rv = POSIX::chdir(\*(Aqpath/to/dir\*(Aq); # good
303 \&
304 \& $rv = POSIX::chdir(); # throws exception
305 .Ve
306 .ie n .IP """chmod""" 8
307 .el .IP \f(CWchmod\fR 8
308 .IX Item "chmod"
309 This is identical to Perl\*(Aqs builtin \f(CWchmod()\fR function, allowing
310 one to change file and directory permissions \-\- see "chmod" in perlfunc \-\- with
311 the exception that \f(CWPOSIX::chmod()\fR can only change one file at a time
312 (rather than a list of files):
313 .Sp
314 .Vb 1
315 \& $c = chmod 0664, $file1, $file2; # good
316 \&
317 \& $c = POSIX::chmod 0664, $file1; # throws exception
318 \&
319 \& $c = POSIX::chmod 0664, $file1, $file2; # throws exception
320 .Ve
321 .Sp
322 As with the built\-in \f(CWchmod()\fR, \f(CW$file\fR may be a filename or a file
323 handle.
324 .ie n .IP """chown""" 8
325 .el .IP \f(CWchown\fR 8
326 .IX Item "chown"
327 This is identical to Perl\*(Aqs builtin \f(CWchown()\fR function, allowing one
328 to change file and directory owners and groups, see "chown" in perlfunc.
329 .ie n .IP """clearerr""" 8
330 .el .IP \f(CWclearerr\fR 8
331 .IX Item "clearerr"
332 Not implemented. Use the method \f(CWIO::Handle::clearerr()\fR instead, to reset the error
333 state (if any) and EOF state (if any) of the given stream.
334 .ie n .IP """clock""" 8
335 .el .IP \f(CWclock\fR 8
336 .IX Item "clock"
337 This is identical to the C function \f(CWclock()\fR, returning the
338 amount of spent processor time in microseconds.
339 .ie n .IP """close""" 8
340 .el .IP \f(CWclose\fR 8
341 .IX Item "close"
342 Close the file. This uses file descriptors such as those obtained by calling
343 \&\f(CW\*(C`POSIX::open\*(C'\fR.
344 .Sp
345 .Vb 2
346 \& $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
347 \& POSIX::close( $fd );
348 .Ve
349 .Sp
350 Returns \f(CW\*(C`undef\*(C'\fR on failure.
351 .Sp
352 See also "close" in perlfunc.
353 .ie n .IP """closedir""" 8
354 .el .IP \f(CWclosedir\fR 8
355 .IX Item "closedir"
356 This is identical to Perl\*(Aqs builtin \f(CWclosedir()\fR function for closing
357 a directory handle, see "closedir" in perlfunc.
358 .ie n .IP """cos""" 8
359 .el .IP \f(CWcos\fR 8
360 .IX Item "cos"
361 This is identical to Perl\*(Aqs builtin \f(CWcos()\fR function for returning the cosine
362 of its numerical argument \-\- except that \f(CWPOSIX::cos()\fR must be provided with
363 an explicit value (rather than relying on an implicit \f(CW$_\fR):
364 .Sp
365 .Vb 1
366 \& $cosine = POSIX::cos(3); # good
367 \&
368 \& $cosine = POSIX::cos(); # throws exception
369 .Ve
370 .Sp
371 See "cos" in perlfunc; see also Math::Trig.
372 .ie n .IP """cosh""" 8
373 .el .IP \f(CWcosh\fR 8
374 .IX Item "cosh"
375 This is identical to the C function \f(CWcosh()\fR, for returning
376 the hyperbolic cosine of its numeric argument. See also Math::Trig.
377 .ie n .IP """copysign""" 8
378 .el .IP \f(CWcopysign\fR 8
379 .IX Item "copysign"
380 Returns \f(CW\*(C`x\*(C'\fR but with the sign of \f(CW\*(C`y\*(C'\fR [C99]. Added in Perl v5.22.
381 .Sp
382 .Vb 1
383 \& $x_with_sign_of_y = POSIX::copysign($x, $y);
384 .Ve
385 .Sp
386 See also "signbit".
387 .ie n .IP """creat""" 8
388 .el .IP \f(CWcreat\fR 8
389 .IX Item "creat"
390 Create a new file. This returns a file descriptor like the ones returned by
391 \&\f(CW\*(C`POSIX::open\*(C'\fR. Use \f(CW\*(C`POSIX::close\*(C'\fR to close the file.
392 .Sp
393 .Vb 2
394 \& $fd = POSIX::creat( "foo", 0611 );
395 \& POSIX::close( $fd );
396 .Ve
397 .Sp
398 See also "sysopen" in perlfunc and its \f(CW\*(C`O_CREAT\*(C'\fR flag.
399 .ie n .IP """ctermid""" 8
400 .el .IP \f(CWctermid\fR 8
401 .IX Item "ctermid"
402 Generates the path name for the controlling terminal.
403 .Sp
404 .Vb 1
405 \& $path = POSIX::ctermid();
406 .Ve
407 .ie n .IP """ctime""" 8
408 .el .IP \f(CWctime\fR 8
409 .IX Item "ctime"
410 This is identical to the C function \f(CWctime()\fR and equivalent
411 to \f(CW\*(C`asctime(localtime(...))\*(C'\fR, see "asctime" and "localtime".
412 .ie n .IP """cuserid"" [POSIX.1\-1988]" 8
413 .el .IP "\f(CWcuserid\fR [POSIX.1\-1988]" 8
414 .IX Item "cuserid [POSIX.1-1988]"
415 Get the login name of the owner of the current process.
416 .Sp
417 .Vb 1
418 \& $name = POSIX::cuserid();
419 .Ve
420 .Sp
421 Note: this function has not been specified by POSIX since 1990 and is included
422 only for backwards compatibility. New code should use \f(CWgetlogin()\fR instead.
423 .ie n .IP """difftime""" 8
424 .el .IP \f(CWdifftime\fR 8
425 .IX Item "difftime"
426 This is identical to the C function \f(CWdifftime()\fR, for returning
427 the time difference (in seconds) between two times (as returned
428 by \f(CWtime()\fR), see "time".
429 .ie n .IP """div""" 8
430 .el .IP \f(CWdiv\fR 8
431 .IX Item "div"
432 Not implemented. \f(CWdiv()\fR is C\-specific, use "int" in perlfunc on the usual \f(CW\*(C`/\*(C'\fR division and
433 the modulus \f(CW\*(C`%\*(C'\fR.
434 .ie n .IP """dup""" 8
435 .el .IP \f(CWdup\fR 8
436 .IX Item "dup"
437 This is similar to the C function \f(CWdup()\fR, for duplicating a file
438 descriptor.
439 .Sp
440 This uses file descriptors such as those obtained by calling
441 \&\f(CW\*(C`POSIX::open\*(C'\fR.
442 .Sp
443 Returns \f(CW\*(C`undef\*(C'\fR on failure.
444 .ie n .IP """dup2""" 8
445 .el .IP \f(CWdup2\fR 8
446 .IX Item "dup2"
447 This is similar to the C function \f(CWdup2()\fR, for duplicating a file
448 descriptor to an another known file descriptor.
449 .Sp
450 This uses file descriptors such as those obtained by calling
451 \&\f(CW\*(C`POSIX::open\*(C'\fR.
452 .Sp
453 Returns \f(CW\*(C`undef\*(C'\fR on failure.
454 .ie n .IP """erf""" 8
455 .el .IP \f(CWerf\fR 8
456 .IX Item "erf"
457 The error function [C99]. Added in Perl v5.22.
458 .ie n .IP """erfc""" 8
459 .el .IP \f(CWerfc\fR 8
460 .IX Item "erfc"
461 The complementary error function [C99]. Added in Perl v5.22.
462 .ie n .IP """errno""" 8
463 .el .IP \f(CWerrno\fR 8
464 .IX Item "errno"
465 Returns the value of errno.
466 .Sp
467 .Vb 1
468 \& $errno = POSIX::errno();
469 .Ve
470 .Sp
471 This identical to the numerical values of the \f(CW$!\fR, see "$ERRNO" in perlvar.
472 .ie n .IP """execl""" 8
473 .el .IP \f(CWexecl\fR 8
474 .IX Item "execl"
475 Not implemented. \f(CWexecl()\fR is C\-specific, see "exec" in perlfunc.
476 .ie n .IP """execle""" 8
477 .el .IP \f(CWexecle\fR 8
478 .IX Item "execle"
479 Not implemented. \f(CWexecle()\fR is C\-specific, see "exec" in perlfunc.
480 .ie n .IP """execlp""" 8
481 .el .IP \f(CWexeclp\fR 8
482 .IX Item "execlp"
483 Not implemented. \f(CWexeclp()\fR is C\-specific, see "exec" in perlfunc.
484 .ie n .IP """execv""" 8
485 .el .IP \f(CWexecv\fR 8
486 .IX Item "execv"
487 Not implemented. \f(CWexecv()\fR is C\-specific, see "exec" in perlfunc.
488 .ie n .IP """execve""" 8
489 .el .IP \f(CWexecve\fR 8
490 .IX Item "execve"
491 Not implemented. \f(CWexecve()\fR is C\-specific, see "exec" in perlfunc.
492 .ie n .IP """execvp""" 8
493 .el .IP \f(CWexecvp\fR 8
494 .IX Item "execvp"
495 Not implemented. \f(CWexecvp()\fR is C\-specific, see "exec" in perlfunc.
496 .ie n .IP """exit""" 8
497 .el .IP \f(CWexit\fR 8
498 .IX Item "exit"
499 This is identical to Perl\*(Aqs builtin \f(CWexit()\fR function for exiting the
500 program, see "exit" in perlfunc.
501 .ie n .IP """exp""" 8
502 .el .IP \f(CWexp\fR 8
503 .IX Item "exp"
504 This is identical to Perl\*(Aqs builtin \f(CWexp()\fR function for returning the
505 exponent (\fIe\fR\-based) of the numerical argument \-\- except that \f(CWPOSIX::exp()\fR
506 must be provided with an explicit value (rather than relying on an implicit
507 \&\f(CW$_\fR):
508 .Sp
509 .Vb 1
510 \& $exp = POSIX::exp(3); # good
511 \&
512 \& $exp = POSIX::exp(); # throws exception
513 .Ve
514 .Sp
515 See "exp" in perlfunc.
516 .ie n .IP """expm1""" 8
517 .el .IP \f(CWexpm1\fR 8
518 .IX Item "expm1"
519 Equivalent to \f(CW\*(C`exp(x) \- 1\*(C'\fR, but more precise for small argument values [C99].
520 Added in Perl v5.22.
521 .Sp
522 See also "log1p".
523 .ie n .IP """fabs""" 8
524 .el .IP \f(CWfabs\fR 8
525 .IX Item "fabs"
526 This is identical to Perl\*(Aqs builtin \f(CWabs()\fR function for returning the
527 absolute value of the numerical argument \-\- except that \f(CWPOSIX::fabs()\fR must
528 be provided with an explicit value (rather than relying on an implicit \f(CW$_\fR):
529 .Sp
530 .Vb 1
531 \& $absolute_value = POSIX::fabs(3); # good
532 \&
533 \& $absolute_value = POSIX::fabs(); # throws exception
534 .Ve
535 .Sp
536 See "abs" in perlfunc.
537 .Sp
538 This is identical to Perl\*(Aqs builtin \f(CWcos()\fR function for returning the cosine
539 =item \f(CW\*(C`fclose\*(C'\fR
540 .Sp
541 Not implemented. Use method \f(CWIO::Handle::close()\fR instead, or see "close" in perlfunc.
542 .ie n .IP """fcntl""" 8
543 .el .IP \f(CWfcntl\fR 8
544 .IX Item "fcntl"
545 This is identical to Perl\*(Aqs builtin \f(CWfcntl()\fR function,
546 see "fcntl" in perlfunc.
547 .ie n .IP """fdopen""" 8
548 .el .IP \f(CWfdopen\fR 8
549 .IX Item "fdopen"
550 Not implemented. Use method \f(CWIO::Handle::new_from_fd()\fR instead, or see "open" in perlfunc.
551 .ie n .IP """feof""" 8
552 .el .IP \f(CWfeof\fR 8
553 .IX Item "feof"
554 Not implemented. Use method \f(CWIO::Handle::eof()\fR instead, or see "eof" in perlfunc.
555 .ie n .IP """ferror""" 8
556 .el .IP \f(CWferror\fR 8
557 .IX Item "ferror"
558 Not implemented. Use method \f(CWIO::Handle::error()\fR instead.
559 .ie n .IP """fflush""" 8
560 .el .IP \f(CWfflush\fR 8
561 .IX Item "fflush"
562 Not implemented. Use method \f(CWIO::Handle::flush()\fR instead.
563 See also \f(CW\*(C`"$OUTPUT_AUTOFLUSH" in perlvar\*(C'\fR.
564 .ie n .IP """fgetc""" 8
565 .el .IP \f(CWfgetc\fR 8
566 .IX Item "fgetc"
567 Not implemented. Use method \f(CWIO::Handle::getc()\fR instead, or see "read" in perlfunc.
568 .ie n .IP """fgetpos""" 8
569 .el .IP \f(CWfgetpos\fR 8
570 .IX Item "fgetpos"
571 Not implemented. Use method \f(CWIO::Seekable::getpos()\fR instead, or see "seek" in perlfunc.
572 .ie n .IP """fgets""" 8
573 .el .IP \f(CWfgets\fR 8
574 .IX Item "fgets"
575 Not implemented. Use method \f(CWIO::Handle::gets()\fR instead. Similar to <>, also known
576 as "readline" in perlfunc.
577 .ie n .IP """fileno""" 8
578 .el .IP \f(CWfileno\fR 8
579 .IX Item "fileno"
580 Not implemented. Use method \f(CWIO::Handle::fileno()\fR instead, or see "fileno" in perlfunc.
581 .ie n .IP """floor""" 8
582 .el .IP \f(CWfloor\fR 8
583 .IX Item "floor"
584 This is identical to the C function \f(CWfloor()\fR, returning the largest
585 integer value less than or equal to the numerical argument.
586 .ie n .IP """fdim""" 8
587 .el .IP \f(CWfdim\fR 8
588 .IX Item "fdim"
589 "Positive difference", \f(CW\*(C`x\ \-\ y\*(C'\fR if \f(CW\*(C`x\ >\ y\*(C'\fR, zero otherwise [C99].
590 Added in Perl v5.22.
591 .ie n .IP """fegetround""" 8
592 .el .IP \f(CWfegetround\fR 8
593 .IX Item "fegetround"
594 Returns the current floating point rounding mode, one of
595 .Sp
596 .Vb 1
597 \& FE_TONEAREST FE_TOWARDZERO FE_UPWARD FE_DOWNWARD
598 .Ve
599 .Sp
600 \&\f(CW\*(C`FE_TONEAREST\*(C'\fR is like "round", \f(CW\*(C`FE_TOWARDZERO\*(C'\fR is like "trunc" [C99].
601 Added in Perl v5.22.
602 .ie n .IP """fesetround""" 8
603 .el .IP \f(CWfesetround\fR 8
604 .IX Item "fesetround"
605 Sets the floating point rounding mode, see "fegetround" [C99]. Added in
606 Perl v5.22.
607 .ie n .IP """fma""" 8
608 .el .IP \f(CWfma\fR 8
609 .IX Item "fma"
610 "Fused multiply\-add", \f(CW\*(C`x\ *\ y\ +\ z\*(C'\fR, possibly faster (and less lossy)
611 than the explicit two operations [C99]. Added in Perl v5.22.
612 .Sp
613 .Vb 1
614 \& my $fused = POSIX::fma($x, $y, $z);
615 .Ve
616 .ie n .IP """fmax""" 8
617 .el .IP \f(CWfmax\fR 8
618 .IX Item "fmax"
619 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].
620 Added in Perl v5.22.
621 .Sp
622 .Vb 1
623 \& my $max = POSIX::fmax($x, $y);
624 .Ve
625 .ie n .IP """fmin""" 8
626 .el .IP \f(CWfmin\fR 8
627 .IX Item "fmin"
628 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].
629 Added in Perl v5.22.
630 .Sp
631 .Vb 1
632 \& my $min = POSIX::fmin($x, $y);
633 .Ve
634 .ie n .IP """fmod""" 8
635 .el .IP \f(CWfmod\fR 8
636 .IX Item "fmod"
637 This is identical to the C function \f(CWfmod()\fR.
638 .Sp
639 .Vb 1
640 \& $r = fmod($x, $y);
641 .Ve
642 .Sp
643 It returns the remainder \f(CW\*(C`$r\ =\ $x\ \-\ $n*$y\*(C'\fR, where \f(CW\*(C`$n\ =\ trunc($x/$y)\*(C'\fR.
644 The \f(CW$r\fR has the same sign as \f(CW$x\fR and magnitude (absolute value)
645 less than the magnitude of \f(CW$y\fR.
646 .ie n .IP """fopen""" 8
647 .el .IP \f(CWfopen\fR 8
648 .IX Item "fopen"
649 Not implemented. Use method \f(CWIO::File::open()\fR instead, or see "open" in perlfunc.
650 .ie n .IP """fork""" 8
651 .el .IP \f(CWfork\fR 8
652 .IX Item "fork"
653 This is identical to Perl\*(Aqs builtin \f(CWfork()\fR function
654 for duplicating the current process, see "fork" in perlfunc
655 and perlfork if you are in Windows.
656 .ie n .IP """fpathconf""" 8
657 .el .IP \f(CWfpathconf\fR 8
658 .IX Item "fpathconf"
659 Retrieves the value of a configurable limit on a file or directory. This
660 uses file descriptors such as those obtained by calling \f(CW\*(C`POSIX::open\*(C'\fR.
661 .Sp
662 The following will determine the maximum length of the longest allowable
663 pathname on the filesystem which holds \fI/var/foo\fR.
664 .Sp
665 .Vb 2
666 \& $fd = POSIX::open( "/var/foo", &POSIX::O_RDONLY );
667 \& $path_max = POSIX::fpathconf($fd, &POSIX::_PC_PATH_MAX);
668 .Ve
669 .Sp
670 Returns \f(CW\*(C`undef\*(C'\fR on failure.
671 .ie n .IP """fpclassify""" 8
672 .el .IP \f(CWfpclassify\fR 8
673 .IX Item "fpclassify"
674 Returns one of
675 .Sp
676 .Vb 1
677 \& FP_NORMAL FP_ZERO FP_SUBNORMAL FP_INFINITE FP_NAN
678 .Ve
679 .Sp
680 telling the class of the argument [C99]. \f(CW\*(C`FP_INFINITE\*(C'\fR is positive
681 or negative infinity, \f(CW\*(C`FP_NAN\*(C'\fR is not\-a\-number. \f(CW\*(C`FP_SUBNORMAL\*(C'\fR
682 means subnormal numbers (also known as denormals), very small numbers
683 with low precision. \f(CW\*(C`FP_ZERO\*(C'\fR is zero. \f(CW\*(C`FP_NORMAL\*(C'\fR is all the rest.
684 Added in Perl v5.22.
685 .ie n .IP """fprintf""" 8
686 .el .IP \f(CWfprintf\fR 8
687 .IX Item "fprintf"
688 Not implemented. \f(CWfprintf()\fR is C\-specific, see "printf" in perlfunc instead.
689 .ie n .IP """fputc""" 8
690 .el .IP \f(CWfputc\fR 8
691 .IX Item "fputc"
692 Not implemented. \f(CWfputc()\fR is C\-specific, see "print" in perlfunc instead.
693 .ie n .IP """fputs""" 8
694 .el .IP \f(CWfputs\fR 8
695 .IX Item "fputs"
696 Not implemented. \f(CWfputs()\fR is C\-specific, see "print" in perlfunc instead.
697 .ie n .IP """fread""" 8
698 .el .IP \f(CWfread\fR 8
699 .IX Item "fread"
700 Not implemented. \f(CWfread()\fR is C\-specific, see "read" in perlfunc instead.
701 .ie n .IP """free""" 8
702 .el .IP \f(CWfree\fR 8
703 .IX Item "free"
704 Not implemented. \f(CWfree()\fR is C\-specific. Perl does memory management transparently.
705 .ie n .IP """freopen""" 8
706 .el .IP \f(CWfreopen\fR 8
707 .IX Item "freopen"
708 Not implemented. \f(CWfreopen()\fR is C\-specific, see "open" in perlfunc instead.
709 .ie n .IP """frexp""" 8
710 .el .IP \f(CWfrexp\fR 8
711 .IX Item "frexp"
712 Return the mantissa and exponent of a floating\-point number.
713 .Sp
714 .Vb 1
715 \& ($mantissa, $exponent) = POSIX::frexp( 1.234e56 );
716 .Ve
717 .ie n .IP """fscanf""" 8
718 .el .IP \f(CWfscanf\fR 8
719 .IX Item "fscanf"
720 Not implemented. \f(CWfscanf()\fR is C\-specific, use <> and regular expressions instead.
721 .ie n .IP """fseek""" 8
722 .el .IP \f(CWfseek\fR 8
723 .IX Item "fseek"
724 Not implemented. Use method \f(CWIO::Seekable::seek()\fR instead, or see "seek" in perlfunc.
725 .ie n .IP """fsetpos""" 8
726 .el .IP \f(CWfsetpos\fR 8
727 .IX Item "fsetpos"
728 Not implemented. Use method \f(CWIO::Seekable::setpos()\fR instead, or seek "seek" in perlfunc.
729 .ie n .IP """fstat""" 8
730 .el .IP \f(CWfstat\fR 8
731 .IX Item "fstat"
732 Get file status. This uses file descriptors such as those obtained by
733 calling \f(CW\*(C`POSIX::open\*(C'\fR. The data returned is identical to the data from
734 Perl\*(Aqs builtin \f(CW\*(C`stat\*(C'\fR function.
735 .Sp
736 .Vb 2
737 \& $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
738 \& @stats = POSIX::fstat( $fd );
739 .Ve
740 .ie n .IP """fsync""" 8
741 .el .IP \f(CWfsync\fR 8
742 .IX Item "fsync"
743 Not implemented. Use method \f(CWIO::Handle::sync()\fR instead.
744 .ie n .IP """ftell""" 8
745 .el .IP \f(CWftell\fR 8
746 .IX Item "ftell"
747 Not implemented. Use method \f(CWIO::Seekable::tell()\fR instead, or see "tell" in perlfunc.
748 .ie n .IP """fwrite""" 8
749 .el .IP \f(CWfwrite\fR 8
750 .IX Item "fwrite"
751 Not implemented. \f(CWfwrite()\fR is C\-specific, see "print" in perlfunc instead.
752 .ie n .IP """getc""" 8
753 .el .IP \f(CWgetc\fR 8
754 .IX Item "getc"
755 This is identical to Perl\*(Aqs builtin \f(CWgetc()\fR function,
756 see "getc" in perlfunc.
757 .ie n .IP """getchar""" 8
758 .el .IP \f(CWgetchar\fR 8
759 .IX Item "getchar"
760 Returns one character from STDIN. Identical to Perl\*(Aqs \f(CWgetc()\fR,
761 see "getc" in perlfunc.
762 .ie n .IP """getcwd""" 8
763 .el .IP \f(CWgetcwd\fR 8
764 .IX Item "getcwd"
765 Returns the name of the current working directory.
766 See also Cwd.
767 .ie n .IP """getegid""" 8
768 .el .IP \f(CWgetegid\fR 8
769 .IX Item "getegid"
770 Returns the effective group identifier. Similar to Perl\*(Aq s builtin
771 variable \f(CW$(\fR, see "$EGID" in perlvar.
772 .ie n .IP """getenv""" 8
773 .el .IP \f(CWgetenv\fR 8
774 .IX Item "getenv"
775 Returns the value of the specified environment variable.
776 The same information is available through the \f(CW%ENV\fR array.
777 .ie n .IP """geteuid""" 8
778 .el .IP \f(CWgeteuid\fR 8
779 .IX Item "geteuid"
780 Returns the effective user identifier. Identical to Perl\*(Aqs builtin \f(CW$>\fR
781 variable, see "$EUID" in perlvar.
782 .ie n .IP """getgid""" 8
783 .el .IP \f(CWgetgid\fR 8
784 .IX Item "getgid"
785 Returns the user\*(Aqs real group identifier. Similar to Perl\*(Aqs builtin
786 variable \f(CW$)\fR, see "$GID" in perlvar.
787 .ie n .IP """getgrgid""" 8
788 .el .IP \f(CWgetgrgid\fR 8
789 .IX Item "getgrgid"
790 This is identical to Perl\*(Aqs builtin \f(CWgetgrgid()\fR function for
791 returning group entries by group identifiers, see
792 "getgrgid" in perlfunc.
793 .ie n .IP """getgrnam""" 8
794 .el .IP \f(CWgetgrnam\fR 8
795 .IX Item "getgrnam"
796 This is identical to Perl\*(Aqs builtin \f(CWgetgrnam()\fR function for
797 returning group entries by group names, see "getgrnam" in perlfunc.
798 .ie n .IP """getgroups""" 8
799 .el .IP \f(CWgetgroups\fR 8
800 .IX Item "getgroups"
801 Returns the ids of the user\*(Aqs supplementary groups. Similar to Perl\*(Aqs
802 builtin variable \f(CW$)\fR, see "$GID" in perlvar.
803 .ie n .IP """getlogin""" 8
804 .el .IP \f(CWgetlogin\fR 8
805 .IX Item "getlogin"
806 This is identical to Perl\*(Aqs builtin \f(CWgetlogin()\fR function for
807 returning the user name associated with the current session, see
808 "getlogin" in perlfunc.
809 .ie n .IP """getpayload""" 8
810 .el .IP \f(CWgetpayload\fR 8
811 .IX Item "getpayload"
812 .Vb 2
813 \& use POSIX \*(Aq:nan_payload\*(Aq;
814 \& getpayload($var)
815 .Ve
816 .Sp
817 Returns the \f(CW\*(C`NaN\*(C'\fR payload. Added in Perl v5.24.
818 .Sp
819 Note the API instability warning in "setpayload".
820 .Sp
821 See "nan" for more discussion about \f(CW\*(C`NaN\*(C'\fR.
822 .ie n .IP """getpgrp""" 8
823 .el .IP \f(CWgetpgrp\fR 8
824 .IX Item "getpgrp"
825 This is identical to Perl\*(Aqs builtin \f(CWgetpgrp()\fR function for
826 returning the process group identifier of the current process, see
827 "getpgrp" in perlfunc.
828 .ie n .IP """getpid""" 8
829 .el .IP \f(CWgetpid\fR 8
830 .IX Item "getpid"
831 Returns the process identifier. Identical to Perl\*(Aqs builtin
832 variable \f(CW$$\fR, see "$PID" in perlvar.
833 .ie n .IP """getppid""" 8
834 .el .IP \f(CWgetppid\fR 8
835 .IX Item "getppid"
836 This is identical to Perl\*(Aqs builtin \f(CWgetppid()\fR function for
837 returning the process identifier of the parent process of the current
838 process , see "getppid" in perlfunc.
839 .ie n .IP """getpwnam""" 8
840 .el .IP \f(CWgetpwnam\fR 8
841 .IX Item "getpwnam"
842 This is identical to Perl\*(Aqs builtin \f(CWgetpwnam()\fR function for
843 returning user entries by user names, see "getpwnam" in perlfunc.
844 .ie n .IP """getpwuid""" 8
845 .el .IP \f(CWgetpwuid\fR 8
846 .IX Item "getpwuid"
847 This is identical to Perl\*(Aqs builtin \f(CWgetpwuid()\fR function for
848 returning user entries by user identifiers, see "getpwuid" in perlfunc.
849 .ie n .IP """gets""" 8
850 .el .IP \f(CWgets\fR 8
851 .IX Item "gets"
852 Returns one line from \f(CW\*(C`STDIN\*(C'\fR, similar to <>, also known
853 as the \f(CWreadline()\fR function, see "readline" in perlfunc.
854 .Sp
855 \&\fBNOTE\fR: if you have C programs that still use \f(CWgets()\fR, be very
856 afraid. The \f(CWgets()\fR function is a source of endless grief because
857 it has no buffer overrun checks. It should \fBnever\fR be used. The
858 \&\f(CWfgets()\fR function should be preferred instead.
859 .ie n .IP """getuid""" 8
860 .el .IP \f(CWgetuid\fR 8
861 .IX Item "getuid"
862 Returns the user\*(Aqs identifier. Identical to Perl\*(Aqs builtin \f(CW$<\fR variable,
863 see "$UID" in perlvar.
864 .ie n .IP """gmtime""" 8
865 .el .IP \f(CWgmtime\fR 8
866 .IX Item "gmtime"
867 This is identical to Perl\*(Aqs builtin \f(CWgmtime()\fR function for
868 converting seconds since the epoch to a date in Greenwich Mean Time,
869 see "gmtime" in perlfunc.
870 .ie n .IP """hypot""" 8
871 .el .IP \f(CWhypot\fR 8
872 .IX Item "hypot"
873 Equivalent to \f(CW\*(C`sqrt(x\ *\ x\ +\ y\ *\ y)\*(C'\fR except more stable on very large
874 or very small arguments [C99]. Added in Perl v5.22.
875 .ie n .IP """ilogb""" 8
876 .el .IP \f(CWilogb\fR 8
877 .IX Item "ilogb"
878 Integer binary logarithm [C99]. Added in Perl v5.22.
879 .Sp
880 For example \f(CWilogb(20)\fR is 4, as an integer.
881 .Sp
882 See also "logb".
883 .ie n .IP """Inf""" 8
884 .el .IP \f(CWInf\fR 8
885 .IX Item "Inf"
886 The infinity as a constant:
887 .Sp
888 .Vb 3
889 \& use POSIX qw(Inf);
890 \& my $pos_inf = +Inf; # Or just Inf.
891 \& my $neg_inf = \-Inf;
892 .Ve
893 .Sp
894 See also "isinf", and "fpclassify".
895 .ie n .IP """isalnum""" 8
896 .el .IP \f(CWisalnum\fR 8
897 .IX Item "isalnum"
898 This function has been removed as of Perl v5.24. It was very similar to
899 matching against \f(CW\*(C`qr/\ ^\ [[:alnum:]]+\ $\ /x\*(C'\fR, which you should convert
900 to use instead. See "POSIX Character Classes" in perlrecharclass.
901 .ie n .IP """isalpha""" 8
902 .el .IP \f(CWisalpha\fR 8
903 .IX Item "isalpha"
904 This function has been removed as of Perl v5.24. It was very similar to
905 matching against \f(CW\*(C`qr/\ ^\ [[:alpha:]]+\ $\ /x\*(C'\fR, which you should convert
906 to use instead. See "POSIX Character Classes" in perlrecharclass.
907 .ie n .IP """isatty""" 8
908 .el .IP \f(CWisatty\fR 8
909 .IX Item "isatty"
910 Returns a boolean indicating whether the specified filehandle is connected
911 to a tty. Similar to the \f(CW\*(C`\-t\*(C'\fR operator, see "\-X" in perlfunc.
912 .ie n .IP """iscntrl""" 8
913 .el .IP \f(CWiscntrl\fR 8
914 .IX Item "iscntrl"
915 This function has been removed as of Perl v5.24. It was very similar to
916 matching against \f(CW\*(C`qr/\ ^\ [[:cntrl:]]+\ $\ /x\*(C'\fR, which you should convert
917 to use instead. See "POSIX Character Classes" in perlrecharclass.
918 .ie n .IP """isdigit""" 8
919 .el .IP \f(CWisdigit\fR 8
920 .IX Item "isdigit"
921 This function has been removed as of Perl v5.24. It was very similar to
922 matching against \f(CW\*(C`qr/\ ^\ [[:digit:]]+\ $\ /x\*(C'\fR, which you should convert
923 to use instead. See "POSIX Character Classes" in perlrecharclass.
924 .ie n .IP """isfinite""" 8
925 .el .IP \f(CWisfinite\fR 8
926 .IX Item "isfinite"
927 Returns true if the argument is a finite number (that is, not an
928 infinity, or the not\-a\-number) [C99]. Added in Perl v5.22.
929 .Sp
930 See also "isinf", "isnan", and "fpclassify".
931 .ie n .IP """isgraph""" 8
932 .el .IP \f(CWisgraph\fR 8
933 .IX Item "isgraph"
934 This function has been removed as of Perl v5.24. It was very similar to
935 matching against \f(CW\*(C`qr/\ ^\ [[:graph:]]+\ $\ /x\*(C'\fR, which you should convert
936 to use instead. See "POSIX Character Classes" in perlrecharclass.
937 .ie n .IP """isgreater""" 8
938 .el .IP \f(CWisgreater\fR 8
939 .IX Item "isgreater"
940 (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,
941 \&\f(CW\*(C`isunordered\*(C'\fR)
942 .Sp
943 Floating point comparisons which handle the \f(CW\*(C`NaN\*(C'\fR [C99]. Added in Perl
944 v5.22.
945 .ie n .IP """isinf""" 8
946 .el .IP \f(CWisinf\fR 8
947 .IX Item "isinf"
948 Returns true if the argument is an infinity (positive or negative) [C99].
949 Added in Perl v5.22.
950 .Sp
951 See also "Inf", "isnan", "isfinite", and "fpclassify".
952 .ie n .IP """islower""" 8
953 .el .IP \f(CWislower\fR 8
954 .IX Item "islower"
955 This function has been removed as of Perl v5.24. It was very similar to
956 matching against \f(CW\*(C`qr/\ ^\ [[:lower:]]+\ $\ /x\*(C'\fR, which you should convert
957 to use instead. See "POSIX Character Classes" in perlrecharclass.
958 .ie n .IP """isnan""" 8
959 .el .IP \f(CWisnan\fR 8
960 .IX Item "isnan"
961 Returns true if the argument is \f(CW\*(C`NaN\*(C'\fR (not\-a\-number) [C99]. Added in
962 Perl v5.22.
963 .Sp
964 Note that you can also test for "\f(CW\*(C`NaN\*(C'\fR\-ness" with
965 equality operators (\f(CW\*(C`==\*(C'\fR or \f(CW\*(C`!=\*(C'\fR), as in
966 .Sp
967 .Vb 1
968 \& print "x is not a NaN\en" if $x == $x;
969 .Ve
970 .Sp
971 since the \f(CW\*(C`NaN\*(C'\fR is not equal to anything, \fBincluding itself\fR.
972 .Sp
973 See also "nan", "NaN", "isinf", and "fpclassify".
974 .ie n .IP """isnormal""" 8
975 .el .IP \f(CWisnormal\fR 8
976 .IX Item "isnormal"
977 Returns true if the argument is normal (that is, not a subnormal/denormal,
978 and not an infinity, or a not\-a\-number) [C99]. Added in Perl v5.22.
979 .Sp
980 See also "isfinite", and "fpclassify".
981 .ie n .IP """isprint""" 8
982 .el .IP \f(CWisprint\fR 8
983 .IX Item "isprint"
984 This function has been removed as of Perl v5.24. It was very similar to
985 matching against \f(CW\*(C`qr/\ ^\ [[:print:]]+\ $\ /x\*(C'\fR, which you should convert
986 to use instead. See "POSIX Character Classes" in perlrecharclass.
987 .ie n .IP """ispunct""" 8
988 .el .IP \f(CWispunct\fR 8
989 .IX Item "ispunct"
990 This function has been removed as of Perl v5.24. It was very similar to
991 matching against \f(CW\*(C`qr/\ ^\ [[:punct:]]+\ $\ /x\*(C'\fR, which you should convert
992 to use instead. See "POSIX Character Classes" in perlrecharclass.
993 .ie n .IP """issignaling""" 8
994 .el .IP \f(CWissignaling\fR 8
995 .IX Item "issignaling"
996 .Vb 2
997 \& use POSIX \*(Aq:nan_payload\*(Aq;
998 \& issignaling($var, $payload)
999 .Ve
1000 .Sp
1001 Return true if the argument is a \fIsignaling\fR NaN. Added in Perl v5.24.
1002 .Sp
1003 Note the API instability warning in "setpayload".
1004 .Sp
1005 See "nan" for more discussion about \f(CW\*(C`NaN\*(C'\fR.
1006 .ie n .IP """isspace""" 8
1007 .el .IP \f(CWisspace\fR 8
1008 .IX Item "isspace"
1009 This function has been removed as of Perl v5.24. It was very similar to
1010 matching against \f(CW\*(C`qr/\ ^\ [[:space:]]+\ $\ /x\*(C'\fR, which you should convert
1011 to use instead. See "POSIX Character Classes" in perlrecharclass.
1012 .ie n .IP """isupper""" 8
1013 .el .IP \f(CWisupper\fR 8
1014 .IX Item "isupper"
1015 This function has been removed as of Perl v5.24. It was very similar to
1016 matching against \f(CW\*(C`qr/\ ^\ [[:upper:]]+\ $\ /x\*(C'\fR, which you should convert
1017 to use instead. See "POSIX Character Classes" in perlrecharclass.
1018 .ie n .IP """isxdigit""" 8
1019 .el .IP \f(CWisxdigit\fR 8
1020 .IX Item "isxdigit"
1021 This function has been removed as of Perl v5.24. It was very similar to
1022 matching against \f(CW\*(C`qr/\ ^\ [[:xdigit:]]+\ $\ /x\*(C'\fR, which you should
1023 convert to use instead. See "POSIX Character Classes" in perlrecharclass.
1024 .ie n .IP """j0""" 8
1025 .el .IP \f(CWj0\fR 8
1026 .IX Item "j0"
1027 .PD 0
1028 .ie n .IP """j1""" 8
1029 .el .IP \f(CWj1\fR 8
1030 .IX Item "j1"
1031 .ie n .IP """jn""" 8
1032 .el .IP \f(CWjn\fR 8
1033 .IX Item "jn"
1034 .ie n .IP """y0""" 8
1035 .el .IP \f(CWy0\fR 8
1036 .IX Item "y0"
1037 .ie n .IP """y1""" 8
1038 .el .IP \f(CWy1\fR 8
1039 .IX Item "y1"
1040 .ie n .IP """yn""" 8
1041 .el .IP \f(CWyn\fR 8
1042 .IX Item "yn"
1043 .PD
1044 The Bessel function of the first kind of the order zero.
1045 .ie n .IP """kill""" 8
1046 .el .IP \f(CWkill\fR 8
1047 .IX Item "kill"
1048 This is identical to Perl\*(Aqs builtin \f(CWkill()\fR function for sending
1049 signals to processes (often to terminate them), see "kill" in perlfunc.
1050 .ie n .IP """labs""" 8
1051 .el .IP \f(CWlabs\fR 8
1052 .IX Item "labs"
1053 Not implemented. (For returning absolute values of long integers.)
1054 \&\f(CWlabs()\fR is C\-specific, see "abs" in perlfunc instead.
1055 .ie n .IP """lchown""" 8
1056 .el .IP \f(CWlchown\fR 8
1057 .IX Item "lchown"
1058 This is identical to the C function, except the order of arguments is
1059 consistent with Perl\*(Aqs builtin \f(CWchown()\fR with the added restriction
1060 of only one path, not a list of paths. Does the same thing as the
1061 \&\f(CWchown()\fR function but changes the owner of a symbolic link instead
1062 of the file the symbolic link points to.
1063 .Sp
1064 .Vb 1
1065 \& POSIX::lchown($uid, $gid, $file_path);
1066 .Ve
1067 .ie n .IP """ldexp""" 8
1068 .el .IP \f(CWldexp\fR 8
1069 .IX Item "ldexp"
1070 This is identical to the C function \f(CWldexp()\fR
1071 for multiplying floating point numbers with powers of two.
1072 .Sp
1073 .Vb 1
1074 \& $x_quadrupled = POSIX::ldexp($x, 2);
1075 .Ve
1076 .ie n .IP """ldiv""" 8
1077 .el .IP \f(CWldiv\fR 8
1078 .IX Item "ldiv"
1079 Not implemented. (For computing dividends of long integers.)
1080 \&\f(CWldiv()\fR is C\-specific, use \f(CW\*(C`/\*(C'\fR and \f(CWint()\fR instead.
1081 .ie n .IP """lgamma""" 8
1082 .el .IP \f(CWlgamma\fR 8
1083 .IX Item "lgamma"
1084 The logarithm of the Gamma function [C99]. Added in Perl v5.22.
1085 .Sp
1086 See also "tgamma".
1087 .ie n .IP """log1p""" 8
1088 .el .IP \f(CWlog1p\fR 8
1089 .IX Item "log1p"
1090 Equivalent to \f(CW\*(C`log(1\ +\ x)\*(C'\fR, but more stable results for small argument
1091 values [C99]. Added in Perl v5.22.
1092 .ie n .IP """log2""" 8
1093 .el .IP \f(CWlog2\fR 8
1094 .IX Item "log2"
1095 Logarithm base two [C99]. Added in Perl v5.22.
1096 .Sp
1097 See also "expm1".
1098 .ie n .IP """logb""" 8
1099 .el .IP \f(CWlogb\fR 8
1100 .IX Item "logb"
1101 Integer binary logarithm [C99]. Added in Perl v5.22.
1102 .Sp
1103 For example \f(CWlogb(20)\fR is 4, as a floating point number.
1104 .Sp
1105 See also "ilogb".
1106 .ie n .IP """link""" 8
1107 .el .IP \f(CWlink\fR 8
1108 .IX Item "link"
1109 This is identical to Perl\*(Aqs builtin \f(CWlink()\fR function
1110 for creating hard links into files, see "link" in perlfunc.
1111 .ie n .IP """localeconv""" 8
1112 .el .IP \f(CWlocaleconv\fR 8
1113 .IX Item "localeconv"
1114 Get numeric formatting information. Returns a reference to a hash
1115 containing the formatting values of the locale that currently underlies
1116 the program, regardless of whether or not it is called from within the
1117 scope of a \f(CW\*(C`use\ locale\*(C'\fR. Users of this function should also read
1118 perllocale, which provides a comprehensive discussion of Perl locale
1119 handling, including
1120 a section devoted to this function.
1121 Prior to Perl 5.28, or when operating in a non thread\-safe environment,
1122 it should not be used in a threaded application unless it\*(Aqs certain that
1123 the underlying locale is C or POSIX. This is because it otherwise
1124 changes the locale, which globally affects all threads simultaneously.
1125 Windows platforms starting with Visual Studio 2005 are mostly
1126 thread\-safe, but use of this function in those prior to Visual Studio
1127 2015 can have a race with a thread that has called
1128 "switch_to_global_locale" in perlapi.
1129 .Sp
1130 Here is how to query the database for the \fBde\fR (Deutsch or German) locale.
1131 .Sp
1132 .Vb 10
1133 \& my $loc = POSIX::setlocale( &POSIX::LC_ALL, "de" );
1134 \& print "Locale: \e"$loc\e"\en";
1135 \& my $lconv = POSIX::localeconv();
1136 \& foreach my $property (qw(
1137 \& decimal_point
1138 \& thousands_sep
1139 \& grouping
1140 \& int_curr_symbol
1141 \& currency_symbol
1142 \& mon_decimal_point
1143 \& mon_thousands_sep
1144 \& mon_grouping
1145 \& positive_sign
1146 \& negative_sign
1147 \& int_frac_digits
1148 \& frac_digits
1149 \& p_cs_precedes
1150 \& p_sep_by_space
1151 \& n_cs_precedes
1152 \& n_sep_by_space
1153 \& p_sign_posn
1154 \& n_sign_posn
1155 \& int_p_cs_precedes
1156 \& int_p_sep_by_space
1157 \& int_n_cs_precedes
1158 \& int_n_sep_by_space
1159 \& int_p_sign_posn
1160 \& int_n_sign_posn
1161 \& ))
1162 \& {
1163 \& printf qq(%s: "%s",\en),
1164 \& $property, $lconv\->{$property};
1165 \& }
1166 .Ve
1167 .Sp
1168 The members whose names begin with \f(CW\*(C`int_p_\*(C'\fR and \f(CW\*(C`int_n_\*(C'\fR were added by
1169 POSIX.1\-2008 and are only available on systems that support them.
1170 .Sp
1171 A value of \-1 returned for numeric entries indicates that the field is
1172 not applicable to the locale. This is rare except in the C and related
1173 locales, which don\*(Aqt have most monetary values defined. It can also
1174 happen, quirkily, in fields that are otherwise boolean to indicate that
1175 the value is kind of neither true nor false. This happens in \f(CW\*(C`p_cs_precedes\*(C'\fR
1176 and \f(CW\*(C`int_p_cs_precedes\*(C'\fR when the currency symbol neither precedes nor
1177 succeeds a positive value but is infixed, by replacing the radix
1178 character.
1179 .Sp
1180 Prior to Perl v5.37.7, empty string fields and numeric fields with value
1181 \&\-1 were omitted from the returned hash.
1182 .ie n .IP """localtime""" 8
1183 .el .IP \f(CWlocaltime\fR 8
1184 .IX Item "localtime"
1185 This is identical to Perl\*(Aqs builtin \f(CWlocaltime()\fR function for
1186 converting seconds since the epoch to a date see "localtime" in perlfunc except
1187 that \f(CWPOSIX::localtime()\fR must be provided an explicit value (rather than
1188 relying on an implicit \f(CW$_\fR):
1189 .Sp
1190 .Vb 1
1191 \& @localtime = POSIX::localtime(time); # good
1192 \&
1193 \& @localtime = localtime(); # good
1194 \&
1195 \& @localtime = POSIX::localtime(); # throws exception
1196 .Ve
1197 .ie n .IP """log""" 8
1198 .el .IP \f(CWlog\fR 8
1199 .IX Item "log"
1200 This is identical to Perl\*(Aqs builtin \f(CWlog()\fR function for returning the
1201 natural (\fIe\fR\-based) logarithm of the numerical argument \-\- except that
1202 \&\f(CWPOSIX::log()\fR must be provided with an explicit value (rather than relying
1203 on an implicit \f(CW$_\fR):
1204 .Sp
1205 .Vb 1
1206 \& $log = POSIX::log(3); # good
1207 \&
1208 \& $log = POSIX::log(); # throws exception
1209 .Ve
1210 .Sp
1211 See "log" in perlfunc.
1212 .ie n .IP """log10""" 8
1213 .el .IP \f(CWlog10\fR 8
1214 .IX Item "log10"
1215 This is identical to the C function \f(CWlog10()\fR,
1216 returning the 10\-base logarithm of the numerical argument.
1217 You can also use
1218 .Sp
1219 .Vb 1
1220 \& sub log10 { log($_[0]) / log(10) }
1221 .Ve
1222 .Sp
1223 or
1224 .Sp
1225 .Vb 1
1226 \& sub log10 { log($_[0]) / 2.30258509299405 }
1227 .Ve
1228 .Sp
1229 or
1230 .Sp
1231 .Vb 1
1232 \& sub log10 { log($_[0]) * 0.434294481903252 }
1233 .Ve
1234 .ie n .IP """longjmp""" 8
1235 .el .IP \f(CWlongjmp\fR 8
1236 .IX Item "longjmp"
1237 Not implemented. \f(CWlongjmp()\fR is C\-specific: use "die" in perlfunc instead.
1238 .ie n .IP """lseek""" 8
1239 .el .IP \f(CWlseek\fR 8
1240 .IX Item "lseek"
1241 Move the file\*(Aqs read/write position. This uses file descriptors such as
1242 those obtained by calling \f(CW\*(C`POSIX::open\*(C'\fR.
1243 .Sp
1244 .Vb 2
1245 \& $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
1246 \& $off_t = POSIX::lseek( $fd, 0, &POSIX::SEEK_SET );
1247 .Ve
1248 .Sp
1249 Returns \f(CW\*(C`undef\*(C'\fR on failure.
1250 .ie n .IP """lrint""" 8
1251 .el .IP \f(CWlrint\fR 8
1252 .IX Item "lrint"
1253 Depending on the current floating point rounding mode, rounds the
1254 argument either toward nearest (like "round"), toward zero (like
1255 "trunc"), downward (toward negative infinity), or upward (toward
1256 positive infinity) [C99]. Added in Perl v5.22.
1257 .Sp
1258 For the rounding mode, see "fegetround".
1259 .ie n .IP """lround""" 8
1260 .el .IP \f(CWlround\fR 8
1261 .IX Item "lround"
1262 Like "round", but as integer, as opposed to floating point [C99]. Added
1263 in Perl v5.22.
1264 .Sp
1265 See also "ceil", "floor", "trunc".
1266 .Sp
1267 Owing to an oversight, this is not currently exported by default, or as part of
1268 the \f(CW\*(C`:math_h_c99\*(C'\fR export tag; importing it must therefore be done by explicit
1269 name.
1270 .ie n .IP """malloc""" 8
1271 .el .IP \f(CWmalloc\fR 8
1272 .IX Item "malloc"
1273 Not implemented. \f(CWmalloc()\fR is C\-specific. Perl does memory management transparently.
1274 .ie n .IP """mblen""" 8
1275 .el .IP \f(CWmblen\fR 8
1276 .IX Item "mblen"
1277 This is the same as the C function \f(CWmblen()\fR on unthreaded perls. On
1278 threaded perls, it transparently (almost) substitutes the more
1279 thread\-safe \f(CW\*(C`\fR\f(CBmbrlen\fR\f(CW\|(3)\*(C'\fR, if available, instead of \f(CW\*(C`mblen\*(C'\fR.
1280 .Sp
1281 Core Perl does not have any support for wide and multibyte locales,
1282 except Unicode UTF\-8 locales. This function, in conjunction with
1283 "mbtowc" and "wctomb" may be used to roll your own decoding/encoding
1284 of other types of multi\-byte locales.
1285 .Sp
1286 Use \f(CW\*(C`undef\*(C'\fR as the first parameter to this function to get the effect
1287 of passing NULL as the first parameter to \f(CW\*(C`mblen\*(C'\fR. This resets any
1288 shift state to its initial value. The return value is undefined if
1289 \&\f(CW\*(C`mbrlen\*(C'\fR was substituted, so you should never rely on it.
1290 .Sp
1291 When the first parameter is a scalar containing a value that either is a
1292 PV string or can be forced into one, the return value is the number of
1293 bytes occupied by the first character of that string; or 0 if that first
1294 character is the wide NUL character; or negative if there is an error.
1295 This is based on the locale that currently underlies the program,
1296 regardless of whether or not the function is called from Perl code that
1297 is within the scope of \f(CW\*(C`use\ locale\*(C'\fR. Perl makes no attempt at
1298 hiding from your code any differences in the \f(CW\*(C`errno\*(C'\fR setting between
1299 \&\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.
1300 .Sp
1301 The optional second parameter is ignored if it is larger than the
1302 actual length of the first parameter string.
1303 .ie n .IP """mbtowc""" 8
1304 .el .IP \f(CWmbtowc\fR 8
1305 .IX Item "mbtowc"
1306 This is the same as the C function \f(CWmbtowc()\fR on unthreaded perls. On
1307 threaded perls, it transparently (almost) substitutes the more
1308 thread\-safe \f(CW\*(C`\fR\f(CBmbrtowc\fR\f(CW\|(3)\*(C'\fR, if available, instead of \f(CW\*(C`mbtowc\*(C'\fR.
1309 .Sp
1310 Core Perl does not have any support for wide and multibyte locales,
1311 except Unicode UTF\-8 locales. This function, in conjunction with
1312 "mblen" and "wctomb" may be used to roll your own decoding/encoding
1313 of other types of multi\-byte locales.
1314 .Sp
1315 The first parameter is a scalar into which, upon success, the wide
1316 character represented by the multi\-byte string contained in the second
1317 parameter is stored. The optional third parameter is ignored if it is
1318 larger than the actual length of the second parameter string.
1319 .Sp
1320 Use \f(CW\*(C`undef\*(C'\fR as the second parameter to this function to get the effect
1321 of passing NULL as the second parameter to \f(CW\*(C`mbtowc\*(C'\fR. This ignores the
1322 first parameter, and resets any shift state to its initial value. The
1323 return value is undefined if \f(CW\*(C`mbrtowc\*(C'\fR was substituted, so you should
1324 never rely on it.
1325 .Sp
1326 When the second parameter is a scalar containing a value that either is
1327 a PV string or can be forced into one, the return value is the number of
1328 bytes occupied by the first character of that string; or 0 if that first
1329 character is the wide NUL character; or negative if there is an error.
1330 This is based on the locale that currently underlies the program,
1331 regardless of whether or not the function is called from Perl code that
1332 is within the scope of \f(CW\*(C`use\ locale\*(C'\fR. Perl makes no attempt at
1333 hiding from your code any differences in the \f(CW\*(C`errno\*(C'\fR setting between
1334 \&\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
1335 them.
1336 .ie n .IP """memchr""" 8
1337 .el .IP \f(CWmemchr\fR 8
1338 .IX Item "memchr"
1339 Not implemented. \f(CWmemchr()\fR is C\-specific, see "index" in perlfunc instead.
1340 .ie n .IP """memcmp""" 8
1341 .el .IP \f(CWmemcmp\fR 8
1342 .IX Item "memcmp"
1343 Not implemented. \f(CWmemcmp()\fR is C\-specific, use \f(CW\*(C`eq\*(C'\fR instead, see perlop.
1344 .ie n .IP """memcpy""" 8
1345 .el .IP \f(CWmemcpy\fR 8
1346 .IX Item "memcpy"
1347 Not implemented. \f(CWmemcpy()\fR is C\-specific, use \f(CW\*(C`=\*(C'\fR, see perlop, or see "substr" in perlfunc.
1348 .ie n .IP """memmove""" 8
1349 .el .IP \f(CWmemmove\fR 8
1350 .IX Item "memmove"
1351 Not implemented. \f(CWmemmove()\fR is C\-specific, use \f(CW\*(C`=\*(C'\fR, see perlop, or see "substr" in perlfunc.
1352 .ie n .IP """memset""" 8
1353 .el .IP \f(CWmemset\fR 8
1354 .IX Item "memset"
1355 Not implemented. \f(CWmemset()\fR is C\-specific, use \f(CW\*(C`x\*(C'\fR instead, see perlop.
1356 .ie n .IP """mkdir""" 8
1357 .el .IP \f(CWmkdir\fR 8
1358 .IX Item "mkdir"
1359 This is identical to Perl\*(Aqs builtin \f(CWmkdir()\fR function
1360 for creating directories, see "mkdir" in perlfunc.
1361 .ie n .IP """mkfifo""" 8
1362 .el .IP \f(CWmkfifo\fR 8
1363 .IX Item "mkfifo"
1364 This is similar to the C function \f(CWmkfifo()\fR for creating
1365 FIFO special files.
1366 .Sp
1367 .Vb 1
1368 \& if (mkfifo($path, $mode)) { ....
1369 .Ve
1370 .Sp
1371 Returns \f(CW\*(C`undef\*(C'\fR on failure. The \f(CW$mode\fR is similar to the
1372 mode of \f(CWmkdir()\fR, see "mkdir" in perlfunc, though for \f(CW\*(C`mkfifo\*(C'\fR
1373 you \fBmust\fR specify the \f(CW$mode\fR.
1374 .ie n .IP """mktime""" 8
1375 .el .IP \f(CWmktime\fR 8
1376 .IX Item "mktime"
1377 Convert date/time info to a calendar time.
1378 .Sp
1379 Synopsis:
1380 .Sp
1381 .Vb 2
1382 \& mktime(sec, min, hour, mday, mon, year, wday = 0,
1383 \& yday = 0, isdst = \-1)
1384 .Ve
1385 .Sp
1386 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,
1387 \&\fIi.e.\fR, January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1. The
1388 year (\f(CW\*(C`year\*(C'\fR) is given in years since 1900; \fIi.e.\fR, the year 1995 is 95; the
1389 year 2001 is 101. Consult your system\*(Aqs \f(CWmktime()\fR manpage for details
1390 about these and the other arguments.
1391 .Sp
1392 Calendar time for December 12, 1995, at 10:30 am.
1393 .Sp
1394 .Vb 2
1395 \& $time_t = POSIX::mktime( 0, 30, 10, 12, 11, 95 );
1396 \& print "Date = ", POSIX::ctime($time_t);
1397 .Ve
1398 .Sp
1399 Returns \f(CW\*(C`undef\*(C'\fR on failure.
1400 .ie n .IP """modf""" 8
1401 .el .IP \f(CWmodf\fR 8
1402 .IX Item "modf"
1403 Return the integral and fractional parts of a floating\-point number.
1404 .Sp
1405 .Vb 1
1406 \& ($fractional, $integral) = POSIX::modf( 3.14 );
1407 .Ve
1408 .Sp
1409 See also "round".
1410 .ie n .IP """NaN""" 8
1411 .el .IP \f(CWNaN\fR 8
1412 .IX Item "NaN"
1413 The not\-a\-number as a constant:
1414 .Sp
1415 .Vb 2
1416 \& use POSIX qw(NaN);
1417 \& my $nan = NaN;
1418 .Ve
1419 .Sp
1420 See also "nan", \f(CW\*(C`/isnan\*(C'\fR, and "fpclassify".
1421 .ie n .IP """nan""" 8
1422 .el .IP \f(CWnan\fR 8
1423 .IX Item "nan"
1424 .Vb 1
1425 \& my $nan = nan();
1426 .Ve
1427 .Sp
1428 Returns \f(CW\*(C`NaN\*(C'\fR, not\-a\-number [C99]. Added in Perl v5.22.
1429 .Sp
1430 The returned NaN is always a \fIquiet\fR NaN, as opposed to \fIsignaling\fR.
1431 .Sp
1432 With an argument, can be used to generate a NaN with \fIpayload\fR.
1433 The argument is first interpreted as a floating point number,
1434 but then any fractional parts are truncated (towards zero),
1435 and the value is interpreted as an unsigned integer.
1436 The bits of this integer are stored in the unused bits of the NaN.
1437 .Sp
1438 The result has a dual nature: it is a NaN, but it also carries
1439 the integer inside it. The integer can be retrieved with "getpayload".
1440 Note, though, that the payload is not propagated, not even on copies,
1441 and definitely not in arithmetic operations.
1442 .Sp
1443 How many bits fit in the NaN depends on what kind of floating points
1444 are being used, but on the most common platforms (64\-bit IEEE 754,
1445 or the x86 80\-bit long doubles) there are 51 and 61 bits available,
1446 respectively. (There would be 52 and 62, but the quiet/signaling
1447 bit of NaNs takes away one.) However, because of the floating\-point\-to\-
1448 integer\-and\-back conversions, please test carefully whether you get back
1449 what you put in. If your integers are only 32 bits wide, you probably
1450 should not rely on more than 32 bits of payload.
1451 .Sp
1452 Whether a "signaling" NaN is in any way different from a "quiet" NaN,
1453 depends on the platform. Also note that the payload of the default
1454 NaN (no argument to \fBnan()\fR) is not necessarily zero, use \f(CW\*(C`setpayload\*(C'\fR
1455 to explicitly set the payload. On some platforms like the 32\-bit x86,
1456 (unless using the 80\-bit long doubles) the signaling bit is not supported
1457 at all.
1458 .Sp
1459 See also "isnan", "NaN", "setpayload" and "issignaling".
1460 .ie n .IP """nearbyint""" 8
1461 .el .IP \f(CWnearbyint\fR 8
1462 .IX Item "nearbyint"
1463 Returns the nearest integer to the argument, according to the current
1464 rounding mode (see "fegetround") [C99]. Added in Perl v5.22.
1465 .ie n .IP """nextafter""" 8
1466 .el .IP \f(CWnextafter\fR 8
1467 .IX Item "nextafter"
1468 Returns the next representable floating point number after \f(CW\*(C`x\*(C'\fR in the
1469 direction of \f(CW\*(C`y\*(C'\fR [C99]. Added in Perl v5.22.
1470 .Sp
1471 .Vb 1
1472 \& my $nextafter = POSIX::nextafter($x, $y);
1473 .Ve
1474 .Sp
1475 Like "nexttoward", but potentially less accurate.
1476 .ie n .IP """nexttoward""" 8
1477 .el .IP \f(CWnexttoward\fR 8
1478 .IX Item "nexttoward"
1479 Returns the next representable floating point number after \f(CW\*(C`x\*(C'\fR in the
1480 direction of \f(CW\*(C`y\*(C'\fR [C99]. Added in Perl v5.22.
1481 .Sp
1482 .Vb 1
1483 \& my $nexttoward = POSIX::nexttoward($x, $y);
1484 .Ve
1485 .Sp
1486 Like "nextafter", but potentially more accurate.
1487 .ie n .IP """nice""" 8
1488 .el .IP \f(CWnice\fR 8
1489 .IX Item "nice"
1490 This is similar to the C function \f(CWnice()\fR, for changing
1491 the scheduling preference of the current process. Positive
1492 arguments mean a more polite process, negative values a more
1493 needy process. Normal (non\-root) user processes can only change towards
1494 being more polite.
1495 .Sp
1496 Returns \f(CW\*(C`undef\*(C'\fR on failure.
1497 .ie n .IP """offsetof""" 8
1498 .el .IP \f(CWoffsetof\fR 8
1499 .IX Item "offsetof"
1500 Not implemented. \f(CWoffsetof()\fR is C\-specific, you probably want to see "pack" in perlfunc instead.
1501 .ie n .IP """open""" 8
1502 .el .IP \f(CWopen\fR 8
1503 .IX Item "open"
1504 Open a file for reading for writing. This returns file descriptors, not
1505 Perl filehandles. Use \f(CW\*(C`POSIX::close\*(C'\fR to close the file.
1506 .Sp
1507 Open a file read\-only with mode 0666.
1508 .Sp
1509 .Vb 1
1510 \& $fd = POSIX::open( "foo" );
1511 .Ve
1512 .Sp
1513 Open a file for read and write.
1514 .Sp
1515 .Vb 1
1516 \& $fd = POSIX::open( "foo", &POSIX::O_RDWR );
1517 .Ve
1518 .Sp
1519 Open a file for write, with truncation.
1520 .Sp
1521 .Vb 3
1522 \& $fd = POSIX::open(
1523 \& "foo", &POSIX::O_WRONLY | &POSIX::O_TRUNC
1524 \& );
1525 .Ve
1526 .Sp
1527 Create a new file with mode 0640. Set up the file for writing.
1528 .Sp
1529 .Vb 3
1530 \& $fd = POSIX::open(
1531 \& "foo", &POSIX::O_CREAT | &POSIX::O_WRONLY, 0640
1532 \& );
1533 .Ve
1534 .Sp
1535 Returns \f(CW\*(C`undef\*(C'\fR on failure.
1536 .Sp
1537 See also "sysopen" in perlfunc.
1538 .ie n .IP """opendir""" 8
1539 .el .IP \f(CWopendir\fR 8
1540 .IX Item "opendir"
1541 Open a directory for reading.
1542 .Sp
1543 .Vb 3
1544 \& $dir = POSIX::opendir( "/var" );
1545 \& @files = POSIX::readdir( $dir );
1546 \& POSIX::closedir( $dir );
1547 .Ve
1548 .Sp
1549 Returns \f(CW\*(C`undef\*(C'\fR on failure.
1550 .ie n .IP """pathconf""" 8
1551 .el .IP \f(CWpathconf\fR 8
1552 .IX Item "pathconf"
1553 Retrieves the value of a configurable limit on a file or directory.
1554 .Sp
1555 The following will determine the maximum length of the longest allowable
1556 pathname on the filesystem which holds \f(CW\*(C`/var\*(C'\fR.
1557 .Sp
1558 .Vb 2
1559 \& $path_max = POSIX::pathconf( "/var",
1560 \& &POSIX::_PC_PATH_MAX );
1561 .Ve
1562 .Sp
1563 Returns \f(CW\*(C`undef\*(C'\fR on failure.
1564 .ie n .IP """pause""" 8
1565 .el .IP \f(CWpause\fR 8
1566 .IX Item "pause"
1567 This is similar to the C function \f(CWpause()\fR, which suspends
1568 the execution of the current process until a signal is received.
1569 .Sp
1570 Returns \f(CW\*(C`undef\*(C'\fR on failure.
1571 .ie n .IP """perror""" 8
1572 .el .IP \f(CWperror\fR 8
1573 .IX Item "perror"
1574 This is identical to the C function \f(CWperror()\fR, which outputs to the
1575 standard error stream the specified message followed by \f(CW": "\fR and the
1576 current error string. Use the \f(CWwarn()\fR function and the \f(CW$!\fR
1577 variable instead, see "warn" in perlfunc and "$ERRNO" in perlvar.
1578 .ie n .IP """pipe""" 8
1579 .el .IP \f(CWpipe\fR 8
1580 .IX Item "pipe"
1581 Create an interprocess channel. This returns file descriptors like those
1582 returned by \f(CW\*(C`POSIX::open\*(C'\fR.
1583 .Sp
1584 .Vb 3
1585 \& my ($read, $write) = POSIX::pipe();
1586 \& POSIX::write( $write, "hello", 5 );
1587 \& POSIX::read( $read, $buf, 5 );
1588 .Ve
1589 .Sp
1590 See also "pipe" in perlfunc.
1591 .ie n .IP """pow""" 8
1592 .el .IP \f(CWpow\fR 8
1593 .IX Item "pow"
1594 Computes \f(CW$x\fR raised to the power \f(CW$exponent\fR.
1595 .Sp
1596 .Vb 1
1597 \& $ret = POSIX::pow( $x, $exponent );
1598 .Ve
1599 .Sp
1600 You can also use the \f(CW\*(C`**\*(C'\fR operator, see perlop.
1601 .ie n .IP """printf""" 8
1602 .el .IP \f(CWprintf\fR 8
1603 .IX Item "printf"
1604 Formats and prints the specified arguments to \f(CW\*(C`STDOUT\*(C'\fR.
1605 See also "printf" in perlfunc.
1606 .ie n .IP """putc""" 8
1607 .el .IP \f(CWputc\fR 8
1608 .IX Item "putc"
1609 Not implemented. \f(CWputc()\fR is C\-specific, see "print" in perlfunc instead.
1610 .ie n .IP """putchar""" 8
1611 .el .IP \f(CWputchar\fR 8
1612 .IX Item "putchar"
1613 Not implemented. \f(CWputchar()\fR is C\-specific, see "print" in perlfunc instead.
1614 .ie n .IP """puts""" 8
1615 .el .IP \f(CWputs\fR 8
1616 .IX Item "puts"
1617 Not implemented. \f(CWputs()\fR is C\-specific, see "print" in perlfunc instead.
1618 .ie n .IP """qsort""" 8
1619 .el .IP \f(CWqsort\fR 8
1620 .IX Item "qsort"
1621 Not implemented. \f(CWqsort()\fR is C\-specific, see "sort" in perlfunc instead.
1622 .ie n .IP """raise""" 8
1623 .el .IP \f(CWraise\fR 8
1624 .IX Item "raise"
1625 Sends the specified signal to the current process.
1626 See also "kill" in perlfunc and the \f(CW$$\fR in "$PID" in perlvar.
1627 .ie n .IP """rand""" 8
1628 .el .IP \f(CWrand\fR 8
1629 .IX Item "rand"
1630 Not implemented. \f(CWrand()\fR is non\-portable, see "rand" in perlfunc instead.
1631 .ie n .IP """read""" 8
1632 .el .IP \f(CWread\fR 8
1633 .IX Item "read"
1634 Read from a file. This uses file descriptors such as those obtained by
1635 calling \f(CW\*(C`POSIX::open\*(C'\fR. If the buffer \f(CW$buf\fR is not large enough for the
1636 read then Perl will extend it to make room for the request.
1637 .Sp
1638 .Vb 2
1639 \& $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
1640 \& $bytes = POSIX::read( $fd, $buf, 3 );
1641 .Ve
1642 .Sp
1643 Returns \f(CW\*(C`undef\*(C'\fR on failure.
1644 .Sp
1645 See also "sysread" in perlfunc.
1646 .ie n .IP """readdir""" 8
1647 .el .IP \f(CWreaddir\fR 8
1648 .IX Item "readdir"
1649 This is identical to Perl\*(Aqs builtin \f(CWreaddir()\fR function
1650 for reading directory entries, see "readdir" in perlfunc.
1651 .ie n .IP """realloc""" 8
1652 .el .IP \f(CWrealloc\fR 8
1653 .IX Item "realloc"
1654 Not implemented. \f(CWrealloc()\fR is C\-specific. Perl does memory management transparently.
1655 .ie n .IP """remainder""" 8
1656 .el .IP \f(CWremainder\fR 8
1657 .IX Item "remainder"
1658 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
1659 closest to \f(CW\*(C`x\*(C'\fR/\f(CW\*(C`y\*(C'\fR [C99]. Added in Perl v5.22.
1660 .Sp
1661 .Vb 1
1662 \& my $remainder = POSIX::remainder($x, $y)
1663 .Ve
1664 .Sp
1665 See also "remquo".
1666 .ie n .IP """remove""" 8
1667 .el .IP \f(CWremove\fR 8
1668 .IX Item "remove"
1669 Deletes a name from the filesystem. Calls "unlink" in perlfunc for
1670 files and "rmdir" in perlfunc for directories.
1671 .ie n .IP """remquo""" 8
1672 .el .IP \f(CWremquo\fR 8
1673 .IX Item "remquo"
1674 Like "remainder" but also returns the low\-order bits of the quotient (n)
1675 [C99]. Added in Perl v5.22.
1676 .Sp
1677 (This is quite esoteric interface, mainly used to implement numerical
1678 algorithms.)
1679 .ie n .IP """rename""" 8
1680 .el .IP \f(CWrename\fR 8
1681 .IX Item "rename"
1682 This is identical to Perl\*(Aqs builtin \f(CWrename()\fR function
1683 for renaming files, see "rename" in perlfunc.
1684 .ie n .IP """rewind""" 8
1685 .el .IP \f(CWrewind\fR 8
1686 .IX Item "rewind"
1687 Seeks to the beginning of the file.
1688 .ie n .IP """rewinddir""" 8
1689 .el .IP \f(CWrewinddir\fR 8
1690 .IX Item "rewinddir"
1691 This is identical to Perl\*(Aqs builtin \f(CWrewinddir()\fR function for
1692 rewinding directory entry streams, see "rewinddir" in perlfunc.
1693 .ie n .IP """rint""" 8
1694 .el .IP \f(CWrint\fR 8
1695 .IX Item "rint"
1696 Identical to "lrint".
1697 .ie n .IP """rmdir""" 8
1698 .el .IP \f(CWrmdir\fR 8
1699 .IX Item "rmdir"
1700 This is identical to Perl\*(Aqs builtin \f(CWrmdir()\fR function
1701 for removing (empty) directories, see "rmdir" in perlfunc.
1702 .ie n .IP """round""" 8
1703 .el .IP \f(CWround\fR 8
1704 .IX Item "round"
1705 Returns the integer (but still as floating point) nearest to the
1706 argument [C99]. Added in Perl v5.22.
1707 .Sp
1708 See also "ceil", "floor", "lround", "modf", and "trunc".
1709 .ie n .IP """scalbn""" 8
1710 .el .IP \f(CWscalbn\fR 8
1711 .IX Item "scalbn"
1712 Returns \f(CW\*(C`x\ *\ 2**y\*(C'\fR [C99]. Added in Perl v5.22.
1713 .Sp
1714 See also "frexp" and "ldexp".
1715 .ie n .IP """scanf""" 8
1716 .el .IP \f(CWscanf\fR 8
1717 .IX Item "scanf"
1718 Not implemented. \f(CWscanf()\fR is C\-specific, use <> and regular expressions instead,
1719 see perlre.
1720 .ie n .IP """setgid""" 8
1721 .el .IP \f(CWsetgid\fR 8
1722 .IX Item "setgid"
1723 Sets the real group identifier and the effective group identifier for
1724 this process. Similar to assigning a value to the Perl\*(Aqs builtin
1725 \&\f(CW$)\fR variable, see "$EGID" in perlvar, except that the latter
1726 will change only the real user identifier, and that the \fBsetgid()\fR
1727 uses only a single numeric argument, as opposed to a space\-separated
1728 list of numbers.
1729 .ie n .IP """setjmp""" 8
1730 .el .IP \f(CWsetjmp\fR 8
1731 .IX Item "setjmp"
1732 Not implemented. \f(CWsetjmp()\fR is C\-specific: use \f(CW\*(C`eval {}\*(C'\fR instead,
1733 see "eval" in perlfunc.
1734 .ie n .IP """setlocale""" 8
1735 .el .IP \f(CWsetlocale\fR 8
1736 .IX Item "setlocale"
1737 WARNING! Prior to Perl 5.28 or on a system that does not support
1738 thread\-safe locale operations, do NOT use this function in a
1739 thread. The locale will change in all other threads at the
1740 same time, and should your thread get paused by the operating system,
1741 and another started, that thread will not have the locale it is
1742 expecting. On some platforms, there can be a race leading to segfaults
1743 if two threads call this function nearly simultaneously. This warning
1744 does not apply on unthreaded builds, or on perls where
1745 \&\f(CW\*(C`${^SAFE_LOCALES}\*(C'\fR exists and is non\-zero; namely Perl 5.28 and later
1746 compiled to be locale\-thread\-safe.
1747 .Sp
1748 This function
1749 modifies and queries the program\*(Aqs underlying locale. Users of this
1750 function should read perllocale, whch provides a comprehensive
1751 discussion of Perl locale handling, knowledge of which is necessary to
1752 properly use this function. It contains
1753 a section devoted to this function.
1754 The discussion here is merely a summary reference for \f(CWsetlocale()\fR.
1755 Note that Perl itself is almost entirely unaffected by the locale
1756 except within the scope of \f(CW"use\ locale"\fR. (Exceptions are listed
1757 in "Not within the scope of "use locale"" in perllocale, and
1758 locale\-dependent functions within the POSIX module ARE always affected
1759 by the current locale.)
1760 .Sp
1761 The following examples assume
1762 .Sp
1763 .Vb 1
1764 \& use POSIX qw(setlocale LC_ALL LC_CTYPE);
1765 .Ve
1766 .Sp
1767 has been issued.
1768 .Sp
1769 The following will set the traditional UNIX system locale behavior
1770 (the second argument \f(CW"C"\fR).
1771 .Sp
1772 .Vb 1
1773 \& $loc = setlocale( LC_ALL, "C" );
1774 .Ve
1775 .Sp
1776 The following will query the current \f(CW\*(C`LC_CTYPE\*(C'\fR category. (No second
1777 argument means \*(Aqquery\*(Aq.)
1778 .Sp
1779 .Vb 1
1780 \& $loc = setlocale( LC_CTYPE );
1781 .Ve
1782 .Sp
1783 The following will set the \f(CW\*(C`LC_CTYPE\*(C'\fR behaviour according to the locale
1784 environment variables (the second argument \f(CW""\fR).
1785 Please see your system\*(Aqs \f(CWsetlocale(3)\fR documentation for the locale
1786 environment variables\*(Aq meaning or consult perllocale.
1787 .Sp
1788 .Vb 1
1789 \& $loc = setlocale( LC_CTYPE, "" );
1790 .Ve
1791 .Sp
1792 The following will set the \f(CW\*(C`LC_COLLATE\*(C'\fR behaviour to Argentinian
1793 Spanish. \fBNOTE\fR: The naming and availability of locales depends on
1794 your operating system. Please consult perllocale for how to find
1795 out which locales are available in your system.
1796 .Sp
1797 .Vb 1
1798 \& $loc = setlocale( LC_COLLATE, "es_AR.ISO8859\-1" );
1799 .Ve
1800 .ie n .IP """setpayload""" 8
1801 .el .IP \f(CWsetpayload\fR 8
1802 .IX Item "setpayload"
1803 .Vb 2
1804 \& use POSIX \*(Aq:nan_payload\*(Aq;
1805 \& setpayload($var, $payload);
1806 .Ve
1807 .Sp
1808 Sets the \f(CW\*(C`NaN\*(C'\fR payload of var. Added in Perl v5.24.
1809 .Sp
1810 NOTE: the NaN payload APIs are based on the latest (as of June 2015)
1811 proposed ISO C interfaces, but they are not yet a standard. Things
1812 may change.
1813 .Sp
1814 See "nan" for more discussion about \f(CW\*(C`NaN\*(C'\fR.
1815 .Sp
1816 See also "setpayloadsig", "isnan", "getpayload", and "issignaling".
1817 .ie n .IP """setpayloadsig""" 8
1818 .el .IP \f(CWsetpayloadsig\fR 8
1819 .IX Item "setpayloadsig"
1820 .Vb 2
1821 \& use POSIX \*(Aq:nan_payload\*(Aq;
1822 \& setpayloadsig($var, $payload);
1823 .Ve
1824 .Sp
1825 Like "setpayload" but also makes the NaN \fIsignaling\fR. Added in Perl
1826 v5.24.
1827 .Sp
1828 Depending on the platform the NaN may or may not behave differently.
1829 .Sp
1830 Note the API instability warning in "setpayload".
1831 .Sp
1832 Note that because how the floating point formats work out, on the most
1833 common platforms signaling payload of zero is best avoided,
1834 since it might end up being identical to \f(CW\*(C`+Inf\*(C'\fR.
1835 .Sp
1836 See also "nan", "isnan", "getpayload", and "issignaling".
1837 .ie n .IP """setpgid""" 8
1838 .el .IP \f(CWsetpgid\fR 8
1839 .IX Item "setpgid"
1840 This is similar to the C function \f(CWsetpgid()\fR for
1841 setting the process group identifier of the current process.
1842 .Sp
1843 Returns \f(CW\*(C`undef\*(C'\fR on failure.
1844 .ie n .IP """setsid""" 8
1845 .el .IP \f(CWsetsid\fR 8
1846 .IX Item "setsid"
1847 This is identical to the C function \f(CWsetsid()\fR for
1848 setting the session identifier of the current process.
1849 .ie n .IP """setuid""" 8
1850 .el .IP \f(CWsetuid\fR 8
1851 .IX Item "setuid"
1852 Sets the real user identifier and the effective user identifier for
1853 this process. Similar to assigning a value to the Perl\*(Aqs builtin
1854 \&\f(CW$<\fR variable, see "$UID" in perlvar, except that the latter
1855 will change only the real user identifier.
1856 .ie n .IP """sigaction""" 8
1857 .el .IP \f(CWsigaction\fR 8
1858 .IX Item "sigaction"
1859 Detailed signal management. This uses \f(CW\*(C`POSIX::SigAction\*(C'\fR objects for
1860 the \f(CW\*(C`action\*(C'\fR and \f(CW\*(C`oldaction\*(C'\fR arguments (the oldaction can also be
1861 just a hash reference). Consult your system\*(Aqs \f(CW\*(C`sigaction\*(C'\fR manpage
1862 for details, see also "POSIX::SigRt".
1863 .Sp
1864 Synopsis:
1865 .Sp
1866 .Vb 1
1867 \& sigaction(signal, action, oldaction = 0)
1868 .Ve
1869 .Sp
1870 Returns \f(CW\*(C`undef\*(C'\fR on failure. The \f(CW\*(C`signal\*(C'\fR must be a number (like
1871 \&\f(CW\*(C`SIGHUP\*(C'\fR), not a string (like \f(CW"SIGHUP"\fR), though Perl does try hard
1872 to understand you.
1873 .Sp
1874 If you use the \f(CW\*(C`SA_SIGINFO\*(C'\fR flag, the signal handler will in addition to
1875 the first argument, the signal name, also receive a second argument, a
1876 hash reference, inside which are the following keys with the following
1877 semantics, as defined by POSIX/SUSv3:
1878 .Sp
1879 .Vb 5
1880 \& signo the signal number
1881 \& errno the error number
1882 \& code if this is zero or less, the signal was sent by
1883 \& a user process and the uid and pid make sense,
1884 \& otherwise the signal was sent by the kernel
1885 .Ve
1886 .Sp
1887 The constants for specific \f(CW\*(C`code\*(C'\fR values can be imported individually
1888 or using the \f(CW\*(C`:signal_h_si_code\*(C'\fR tag, since Perl v5.24.
1889 .Sp
1890 The following are also defined by POSIX/SUSv3, but unfortunately
1891 not very widely implemented:
1892 .Sp
1893 .Vb 6
1894 \& pid the process id generating the signal
1895 \& uid the uid of the process id generating the signal
1896 \& status exit value or signal for SIGCHLD
1897 \& band band event for SIGPOLL
1898 \& addr address of faulting instruction or memory
1899 \& reference for SIGILL, SIGFPE, SIGSEGV or SIGBUS
1900 .Ve
1901 .Sp
1902 A third argument is also passed to the handler, which contains a copy
1903 of the raw binary contents of the \f(CW\*(C`siginfo\*(C'\fR structure: if a system has
1904 some non\-POSIX fields, this third argument is where to \f(CWunpack()\fR them
1905 from.
1906 .Sp
1907 Note that not all \f(CW\*(C`siginfo\*(C'\fR values make sense simultaneously (some are
1908 valid only for certain signals, for example), and not all values make
1909 sense from Perl perspective, you should to consult your system\*(Aqs
1910 \&\f(CW\*(C`sigaction\*(C'\fR and possibly also \f(CW\*(C`siginfo\*(C'\fR documentation.
1911 .ie n .IP """siglongjmp""" 8
1912 .el .IP \f(CWsiglongjmp\fR 8
1913 .IX Item "siglongjmp"
1914 Not implemented. \f(CWsiglongjmp()\fR is C\-specific: use "die" in perlfunc instead.
1915 .ie n .IP """signbit""" 8
1916 .el .IP \f(CWsignbit\fR 8
1917 .IX Item "signbit"
1918 Returns zero for positive arguments, non\-zero for negative arguments [C99].
1919 Added in Perl v5.22.
1920 .ie n .IP """sigpending""" 8
1921 .el .IP \f(CWsigpending\fR 8
1922 .IX Item "sigpending"
1923 Examine signals that are blocked and pending. This uses \f(CW\*(C`POSIX::SigSet\*(C'\fR
1924 objects for the \f(CW\*(C`sigset\*(C'\fR argument. Consult your system\*(Aqs \f(CW\*(C`sigpending\*(C'\fR
1925 manpage for details.
1926 .Sp
1927 Synopsis:
1928 .Sp
1929 .Vb 1
1930 \& sigpending(sigset)
1931 .Ve
1932 .Sp
1933 Returns \f(CW\*(C`undef\*(C'\fR on failure.
1934 .ie n .IP """sigprocmask""" 8
1935 .el .IP \f(CWsigprocmask\fR 8
1936 .IX Item "sigprocmask"
1937 Change and/or examine calling process\*(Aqs signal mask. This uses
1938 \&\f(CW\*(C`POSIX::SigSet\*(C'\fR objects for the \f(CW\*(C`sigset\*(C'\fR and \f(CW\*(C`oldsigset\*(C'\fR arguments.
1939 Consult your system\*(Aqs \f(CW\*(C`sigprocmask\*(C'\fR manpage for details.
1940 .Sp
1941 Synopsis:
1942 .Sp
1943 .Vb 1
1944 \& sigprocmask(how, sigset, oldsigset = 0)
1945 .Ve
1946 .Sp
1947 Returns \f(CW\*(C`undef\*(C'\fR on failure.
1948 .Sp
1949 Note that you can\*(Aqt reliably block or unblock a signal from its own signal
1950 handler if you\*(Aqre using safe signals. Other signals can be blocked or unblocked
1951 reliably.
1952 .ie n .IP """sigsetjmp""" 8
1953 .el .IP \f(CWsigsetjmp\fR 8
1954 .IX Item "sigsetjmp"
1955 Not implemented. \f(CWsigsetjmp()\fR is C\-specific: use \f(CW\*(C`eval {}\*(C'\fR instead,
1956 see "eval" in perlfunc.
1957 .ie n .IP """sigsuspend""" 8
1958 .el .IP \f(CWsigsuspend\fR 8
1959 .IX Item "sigsuspend"
1960 Install a signal mask and suspend process until signal arrives. This uses
1961 \&\f(CW\*(C`POSIX::SigSet\*(C'\fR objects for the \f(CW\*(C`signal_mask\*(C'\fR argument. Consult your
1962 system\*(Aqs \f(CW\*(C`sigsuspend\*(C'\fR manpage for details.
1963 .Sp
1964 Synopsis:
1965 .Sp
1966 .Vb 1
1967 \& sigsuspend(signal_mask)
1968 .Ve
1969 .Sp
1970 Returns \f(CW\*(C`undef\*(C'\fR on failure.
1971 .ie n .IP """sin""" 8
1972 .el .IP \f(CWsin\fR 8
1973 .IX Item "sin"
1974 This is identical to Perl\*(Aqs builtin \f(CWsin()\fR function, for returning the sine
1975 of its numerical argument \-\- except that \f(CWPOSIX::sin()\fR must be provided with
1976 an explicit value (rather than relying on an implicit \f(CW$_\fR):
1977 .Sp
1978 .Vb 1
1979 \& $sine = POSIX::sin(3); # good
1980 \&
1981 \& $sine = POSIX::sin(); # throws exception
1982 .Ve
1983 .Sp
1984 See "sin" in perlfunc; see also Math::Trig.
1985 .ie n .IP """sinh""" 8
1986 .el .IP \f(CWsinh\fR 8
1987 .IX Item "sinh"
1988 This is identical to the C function \f(CWsinh()\fR
1989 for returning the hyperbolic sine of the numerical argument.
1990 See also Math::Trig.
1991 .ie n .IP """sleep""" 8
1992 .el .IP \f(CWsleep\fR 8
1993 .IX Item "sleep"
1994 This is functionally identical to Perl\*(Aqs builtin \f(CWsleep()\fR function
1995 for suspending the execution of the current for process for certain
1996 number of seconds, see "sleep" in perlfunc. There is one significant
1997 difference, however: \f(CWPOSIX::sleep()\fR returns the number of
1998 \&\fBunslept\fR seconds, while the \f(CWCORE::sleep()\fR returns the
1999 number of slept seconds.
2000 .ie n .IP """sprintf""" 8
2001 .el .IP \f(CWsprintf\fR 8
2002 .IX Item "sprintf"
2003 This is similar to Perl\*(Aqs builtin \f(CWsprintf()\fR function
2004 for returning a string that has the arguments formatted as requested,
2005 see "sprintf" in perlfunc.
2006 .ie n .IP """sqrt""" 8
2007 .el .IP \f(CWsqrt\fR 8
2008 .IX Item "sqrt"
2009 This is identical to Perl\*(Aqs builtin \f(CWsqrt()\fR function for returning the
2010 square root of the numerical argument \-\- except that \f(CWPOSIX::sqrt()\fR
2011 must be provided with an explicit value (rather than relying on an implicit \f(CW$_\fR):
2012 .Sp
2013 .Vb 1
2014 \& $square_root = POSIX::sqrt(3); # good
2015 \&
2016 \& $square_root = POSIX::sqrt(); # throws exception
2017 .Ve
2018 .Sp
2019 See "sqrt" in perlfunc.
2020 .ie n .IP """srand""" 8
2021 .el .IP \f(CWsrand\fR 8
2022 .IX Item "srand"
2023 Give a seed the pseudorandom number generator, see "srand" in perlfunc.
2024 .ie n .IP """sscanf""" 8
2025 .el .IP \f(CWsscanf\fR 8
2026 .IX Item "sscanf"
2027 Not implemented. \f(CWsscanf()\fR is C\-specific, use regular expressions instead,
2028 see perlre.
2029 .ie n .IP """stat""" 8
2030 .el .IP \f(CWstat\fR 8
2031 .IX Item "stat"
2032 This is identical to Perl\*(Aqs builtin \f(CWstat()\fR function
2033 for returning information about files and directories.
2034 .ie n .IP """strcat""" 8
2035 .el .IP \f(CWstrcat\fR 8
2036 .IX Item "strcat"
2037 Not implemented. \f(CWstrcat()\fR is C\-specific, use \f(CW\*(C`.=\*(C'\fR instead, see perlop.
2038 .ie n .IP """strchr""" 8
2039 .el .IP \f(CWstrchr\fR 8
2040 .IX Item "strchr"
2041 Not implemented. \f(CWstrchr()\fR is C\-specific, see "index" in perlfunc instead.
2042 .ie n .IP """strcmp""" 8
2043 .el .IP \f(CWstrcmp\fR 8
2044 .IX Item "strcmp"
2045 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.
2046 .ie n .IP """strcoll""" 8
2047 .el .IP \f(CWstrcoll\fR 8
2048 .IX Item "strcoll"
2049 This is identical to the C function \f(CWstrcoll()\fR
2050 for collating (comparing) strings transformed using
2051 the \f(CWstrxfrm()\fR function. Not really needed since
2052 Perl can do this transparently, see perllocale.
2053 .Sp
2054 Beware that in a UTF\-8 locale, anything you pass to this function must
2055 be in UTF\-8; and when not in a UTF\-8 locale, anything passed must not be
2056 UTF\-8 encoded.
2057 .Sp
2058 Note also that it doesn\*(Aqt make sense for a string to be encoded in one
2059 locale (say, ISO\-8859\-6, Arabic) and to collate it based on another
2060 (like ISO\-8859\-7, Greek). The results will be essentially meaningless.
2061 .ie n .IP """strcpy""" 8
2062 .el .IP \f(CWstrcpy\fR 8
2063 .IX Item "strcpy"
2064 Not implemented. \f(CWstrcpy()\fR is C\-specific, use \f(CW\*(C`=\*(C'\fR instead, see perlop.
2065 .ie n .IP """strcspn""" 8
2066 .el .IP \f(CWstrcspn\fR 8
2067 .IX Item "strcspn"
2068 Not implemented. \f(CWstrcspn()\fR is C\-specific, use regular expressions instead,
2069 see perlre.
2070 .ie n .IP """strerror""" 8
2071 .el .IP \f(CWstrerror\fR 8
2072 .IX Item "strerror"
2073 Returns the error string for the specified errno.
2074 Identical to the string form of \f(CW$!\fR, see "$ERRNO" in perlvar.
2075 .ie n .IP """strftime""" 8
2076 .el .IP \f(CWstrftime\fR 8
2077 .IX Item "strftime"
2078 Convert date and time information to string based on the current
2079 underlying locale of the program.
2080 Returns the string in a mortalized SV; set to an empty string on error.
2081 .Sp
2082 .Vb 2
2083 \& my $sv = strftime(fmt, sec, min, hour, mday, mon, year,
2084 \& wday = \-1, yday = \-1, isdst = \-1)
2085 .Ve
2086 .Sp
2087 The \f(CW\*(C`wday\*(C'\fR and \f(CW\*(C`yday\*(C'\fR parameters are both ignored. Their values are
2088 always determinable from the other parameters.
2089 .Sp
2090 More details on the behavior and the specification of the other
2091 parameters are described in "sv_strftime_ints" in perlapi.
2092 .ie n .IP """strlen""" 8
2093 .el .IP \f(CWstrlen\fR 8
2094 .IX Item "strlen"
2095 Not implemented. \f(CWstrlen()\fR is C\-specific, use \f(CWlength()\fR instead, see "length" in perlfunc.
2096 .ie n .IP """strncat""" 8
2097 .el .IP \f(CWstrncat\fR 8
2098 .IX Item "strncat"
2099 Not implemented. \f(CWstrncat()\fR is C\-specific, use \f(CW\*(C`.=\*(C'\fR instead, see perlop.
2100 .ie n .IP """strncmp""" 8
2101 .el .IP \f(CWstrncmp\fR 8
2102 .IX Item "strncmp"
2103 Not implemented. \f(CWstrncmp()\fR is C\-specific, use \f(CW\*(C`eq\*(C'\fR instead, see perlop.
2104 .ie n .IP """strncpy""" 8
2105 .el .IP \f(CWstrncpy\fR 8
2106 .IX Item "strncpy"
2107 Not implemented. \f(CWstrncpy()\fR is C\-specific, use \f(CW\*(C`=\*(C'\fR instead, see perlop.
2108 .ie n .IP """strpbrk""" 8
2109 .el .IP \f(CWstrpbrk\fR 8
2110 .IX Item "strpbrk"
2111 Not implemented. \f(CWstrpbrk()\fR is C\-specific, use regular expressions instead,
2112 see perlre.
2113 .ie n .IP """strrchr""" 8
2114 .el .IP \f(CWstrrchr\fR 8
2115 .IX Item "strrchr"
2116 Not implemented. \f(CWstrrchr()\fR is C\-specific, see "rindex" in perlfunc instead.
2117 .ie n .IP """strspn""" 8
2118 .el .IP \f(CWstrspn\fR 8
2119 .IX Item "strspn"
2120 Not implemented. \f(CWstrspn()\fR is C\-specific, use regular expressions instead,
2121 see perlre.
2122 .ie n .IP """strstr""" 8
2123 .el .IP \f(CWstrstr\fR 8
2124 .IX Item "strstr"
2125 This is identical to Perl\*(Aqs builtin \f(CWindex()\fR function,
2126 see "index" in perlfunc.
2127 .ie n .IP """strtod""" 8
2128 .el .IP \f(CWstrtod\fR 8
2129 .IX Item "strtod"
2130 String to double translation. Returns the parsed number and the number
2131 of characters in the unparsed portion of the string. Truly
2132 POSIX\-compliant systems set \f(CW$!\fR (\f(CW$ERRNO\fR) to indicate a translation
2133 error, so clear \f(CW$!\fR before calling \f(CW\*(C`strtod\*(C'\fR. However, non\-POSIX systems
2134 may not check for overflow, and therefore will never set \f(CW$!\fR.
2135 .Sp
2136 \&\f(CW\*(C`strtod\*(C'\fR respects any POSIX \f(CWsetlocale()\fR \f(CW\*(C`LC_NUMERIC\*(C'\fR settings,
2137 regardless of whether or not it is called from Perl code that is within
2138 the scope of \f(CW\*(C`use\ locale\*(C'\fR. Prior to Perl 5.28, or when operating in
2139 a non thread\-safe environment, it should not be used in a threaded
2140 application unless it\*(Aqs certain that the underlying locale is C
2141 or POSIX. This is because it otherwise changes the locale, which
2142 globally affects all threads simultaneously.
2143 .Sp
2144 To parse a string \f(CW$str\fR as a floating point number use
2145 .Sp
2146 .Vb 2
2147 \& $! = 0;
2148 \& ($num, $n_unparsed) = POSIX::strtod($str);
2149 .Ve
2150 .Sp
2151 The second returned item and \f(CW$!\fR can be used to check for valid input:
2152 .Sp
2153 .Vb 3
2154 \& if (($str eq \*(Aq\*(Aq) || ($n_unparsed != 0) || $!) {
2155 \& die "Non\-numeric input $str" . ($! ? ": $!\en" : "\en");
2156 \& }
2157 .Ve
2158 .Sp
2159 When called in a scalar context \f(CW\*(C`strtod\*(C'\fR returns the parsed number.
2160 .ie n .IP """strtok""" 8
2161 .el .IP \f(CWstrtok\fR 8
2162 .IX Item "strtok"
2163 Not implemented. \f(CWstrtok()\fR is C\-specific, use regular expressions instead, see
2164 perlre, or "split" in perlfunc.
2165 .ie n .IP """strtol""" 8
2166 .el .IP \f(CWstrtol\fR 8
2167 .IX Item "strtol"
2168 String to (long) integer translation. Returns the parsed number and
2169 the number of characters in the unparsed portion of the string. Truly
2170 POSIX\-compliant systems set \f(CW$!\fR (\f(CW$ERRNO\fR) to indicate a translation
2171 error, so clear \f(CW$!\fR before calling \f(CW\*(C`strtol\*(C'\fR. However, non\-POSIX systems
2172 may not check for overflow, and therefore will never set \f(CW$!\fR.
2173 .Sp
2174 \&\f(CW\*(C`strtol\*(C'\fR should respect any POSIX \fR\f(BIsetlocale()\fR\fI\fR settings.
2175 .Sp
2176 To parse a string \f(CW$str\fR as a number in some base \f(CW$base\fR use
2177 .Sp
2178 .Vb 2
2179 \& $! = 0;
2180 \& ($num, $n_unparsed) = POSIX::strtol($str, $base);
2181 .Ve
2182 .Sp
2183 The base should be zero or between 2 and 36, inclusive. When the base
2184 is zero or omitted \f(CW\*(C`strtol\*(C'\fR will use the string itself to determine the
2185 base: a leading "0x" or "0X" means hexadecimal; a leading "0" means
2186 octal; any other leading characters mean decimal. Thus, "1234" is
2187 parsed as a decimal number, "01234" as an octal number, and "0x1234"
2188 as a hexadecimal number.
2189 .Sp
2190 The second returned item and \f(CW$!\fR can be used to check for valid input:
2191 .Sp
2192 .Vb 3
2193 \& if (($str eq \*(Aq\*(Aq) || ($n_unparsed != 0) || !$!) {
2194 \& die "Non\-numeric input $str" . $! ? ": $!\en" : "\en";
2195 \& }
2196 .Ve
2197 .Sp
2198 When called in a scalar context \f(CW\*(C`strtol\*(C'\fR returns the parsed number.
2199 .ie n .IP """strtold""" 8
2200 .el .IP \f(CWstrtold\fR 8
2201 .IX Item "strtold"
2202 Like "strtod" but for long doubles. Defined only if the
2203 system supports long doubles.
2204 .ie n .IP """strtoul""" 8
2205 .el .IP \f(CWstrtoul\fR 8
2206 .IX Item "strtoul"
2207 String to unsigned (long) integer translation. \f(CWstrtoul()\fR is identical
2208 to \f(CWstrtol()\fR except that \f(CWstrtoul()\fR only parses unsigned integers. See
2209 "strtol" for details.
2210 .Sp
2211 Note: Some vendors supply \f(CWstrtod()\fR and \f(CWstrtol()\fR but not \f(CWstrtoul()\fR.
2212 Other vendors that do supply \f(CWstrtoul()\fR parse "\-1" as a valid value.
2213 .ie n .IP """strxfrm""" 8
2214 .el .IP \f(CWstrxfrm\fR 8
2215 .IX Item "strxfrm"
2216 String transformation. Returns the transformed string.
2217 .Sp
2218 .Vb 1
2219 \& $dst = POSIX::strxfrm( $src );
2220 .Ve
2221 .Sp
2222 Used with \f(CW\*(C`eq\*(C'\fR or \f(CW\*(C`cmp\*(C'\fR as an alternative to \f(CW"strcoll"\fR.
2223 .Sp
2224 Not really needed since Perl can do this transparently, see
2225 perllocale.
2226 .Sp
2227 Unlike the libc \f(CW\*(C`strxfrm\*(C'\fR, this allows NUL characters in the input
2228 \&\f(CW$src\fR.
2229 .Sp
2230 It doesn\*(Aqt make sense for a string to be encoded in one locale (say,
2231 ISO\-8859\-6, Arabic) and to collate it based on another (like ISO\-8859\-7,
2232 Greek). Perl assumes that the current \f(CW\*(C`LC_CTYPE\*(C'\fR locale correctly
2233 represents the encoding of \f(CW$src\fR, and ignores the value of
2234 \&\f(CW\*(C`LC_COLLATE\*(C'\fR.
2235 .ie n .IP """sysconf""" 8
2236 .el .IP \f(CWsysconf\fR 8
2237 .IX Item "sysconf"
2238 Retrieves values of system configurable variables.
2239 .Sp
2240 The following will get the machine\*(Aqs clock speed.
2241 .Sp
2242 .Vb 1
2243 \& $clock_ticks = POSIX::sysconf( &POSIX::_SC_CLK_TCK );
2244 .Ve
2245 .Sp
2246 Returns \f(CW\*(C`undef\*(C'\fR on failure.
2247 .ie n .IP """system""" 8
2248 .el .IP \f(CWsystem\fR 8
2249 .IX Item "system"
2250 This is identical to Perl\*(Aqs builtin \f(CWsystem()\fR function, see
2251 "system" in perlfunc.
2252 .ie n .IP """tan""" 8
2253 .el .IP \f(CWtan\fR 8
2254 .IX Item "tan"
2255 This is identical to the C function \f(CWtan()\fR, returning the
2256 tangent of the numerical argument. See also Math::Trig.
2257 .ie n .IP """tanh""" 8
2258 .el .IP \f(CWtanh\fR 8
2259 .IX Item "tanh"
2260 This is identical to the C function \f(CWtanh()\fR, returning the
2261 hyperbolic tangent of the numerical argument. See also Math::Trig.
2262 .ie n .IP """tcdrain""" 8
2263 .el .IP \f(CWtcdrain\fR 8
2264 .IX Item "tcdrain"
2265 This is similar to the C function \f(CWtcdrain()\fR for draining
2266 the output queue of its argument stream.
2267 .Sp
2268 Returns \f(CW\*(C`undef\*(C'\fR on failure.
2269 .ie n .IP """tcflow""" 8
2270 .el .IP \f(CWtcflow\fR 8
2271 .IX Item "tcflow"
2272 This is similar to the C function \f(CWtcflow()\fR for controlling
2273 the flow of its argument stream.
2274 .Sp
2275 Returns \f(CW\*(C`undef\*(C'\fR on failure.
2276 .ie n .IP """tcflush""" 8
2277 .el .IP \f(CWtcflush\fR 8
2278 .IX Item "tcflush"
2279 This is similar to the C function \f(CWtcflush()\fR for flushing
2280 the I/O buffers of its argument stream.
2281 .Sp
2282 Returns \f(CW\*(C`undef\*(C'\fR on failure.
2283 .ie n .IP """tcgetpgrp""" 8
2284 .el .IP \f(CWtcgetpgrp\fR 8
2285 .IX Item "tcgetpgrp"
2286 This is identical to the C function \f(CWtcgetpgrp()\fR for returning the
2287 process group identifier of the foreground process group of the controlling
2288 terminal.
2289 .ie n .IP """tcsendbreak""" 8
2290 .el .IP \f(CWtcsendbreak\fR 8
2291 .IX Item "tcsendbreak"
2292 This is similar to the C function \f(CWtcsendbreak()\fR for sending
2293 a break on its argument stream.
2294 .Sp
2295 Returns \f(CW\*(C`undef\*(C'\fR on failure.
2296 .ie n .IP """tcsetpgrp""" 8
2297 .el .IP \f(CWtcsetpgrp\fR 8
2298 .IX Item "tcsetpgrp"
2299 This is similar to the C function \f(CWtcsetpgrp()\fR for setting the
2300 process group identifier of the foreground process group of the controlling
2301 terminal.
2302 .Sp
2303 Returns \f(CW\*(C`undef\*(C'\fR on failure.
2304 .ie n .IP """tgamma""" 8
2305 .el .IP \f(CWtgamma\fR 8
2306 .IX Item "tgamma"
2307 The Gamma function [C99]. Added in Perl v5.22.
2308 .Sp
2309 See also "lgamma".
2310 .ie n .IP """time""" 8
2311 .el .IP \f(CWtime\fR 8
2312 .IX Item "time"
2313 This is identical to Perl\*(Aqs builtin \f(CWtime()\fR function
2314 for returning the number of seconds since the epoch
2315 (whatever it is for the system), see "time" in perlfunc.
2316 .ie n .IP """times""" 8
2317 .el .IP \f(CWtimes\fR 8
2318 .IX Item "times"
2319 The \f(CWtimes()\fR function returns elapsed realtime since some point in the past
2320 (such as system startup), user and system times for this process, and user
2321 and system times used by child processes. All times are returned in clock
2322 ticks.
2323 .Sp
2324 .Vb 2
2325 \& ($realtime, $user, $system, $cuser, $csystem)
2326 \& = POSIX::times();
2327 .Ve
2328 .Sp
2329 Note: Perl\*(Aqs builtin \f(CWtimes()\fR function returns four values, measured in
2330 seconds.
2331 .ie n .IP """tmpfile""" 8
2332 .el .IP \f(CWtmpfile\fR 8
2333 .IX Item "tmpfile"
2334 Not implemented. Use method \f(CWIO::File::new_tmpfile()\fR instead, or see File::Temp.
2335 .ie n .IP """tmpnam""" 8
2336 .el .IP \f(CWtmpnam\fR 8
2337 .IX Item "tmpnam"
2338 For security reasons, which are probably detailed in your system\*(Aqs
2339 documentation for the C library \f(CWtmpnam()\fR function, this interface
2340 is no longer available since Perl v5.26; instead use File::Temp.
2341 .ie n .IP """tolower""" 8
2342 .el .IP \f(CWtolower\fR 8
2343 .IX Item "tolower"
2344 This function has been removed as of Perl v5.26.
2345 This is identical to the C function, except that it can apply to a single
2346 character or to a whole string, and currently operates as if the locale
2347 always is "C". Consider using the \f(CWlc()\fR function, see "lc" in perlfunc,
2348 see "lc" in perlfunc, or the equivalent \f(CW\*(C`\eL\*(C'\fR operator inside doublequotish
2349 strings.
2350 .ie n .IP """toupper""" 8
2351 .el .IP \f(CWtoupper\fR 8
2352 .IX Item "toupper"
2353 This function has been removed as of Perl v5.26.
2354 This is similar to the C function, except that it can apply to a single
2355 character or to a whole string, and currently operates as if the locale
2356 always is "C". Consider using the \f(CWuc()\fR function, see "uc" in perlfunc,
2357 or the equivalent \f(CW\*(C`\eU\*(C'\fR operator inside doublequotish strings.
2358 .ie n .IP """trunc""" 8
2359 .el .IP \f(CWtrunc\fR 8
2360 .IX Item "trunc"
2361 Returns the integer toward zero from the argument [C99]. Added in Perl
2362 v5.22.
2363 .Sp
2364 See also "ceil", "floor", and "round".
2365 .ie n .IP """ttyname""" 8
2366 .el .IP \f(CWttyname\fR 8
2367 .IX Item "ttyname"
2368 This is identical to the C function \f(CWttyname()\fR for returning the
2369 name of the current terminal.
2370 .ie n .IP """tzname""" 8
2371 .el .IP \f(CWtzname\fR 8
2372 .IX Item "tzname"
2373 Retrieves the time conversion information from the \f(CW\*(C`tzname\*(C'\fR variable.
2374 .Sp
2375 .Vb 2
2376 \& POSIX::tzset();
2377 \& ($std, $dst) = POSIX::tzname();
2378 .Ve
2379 .ie n .IP """tzset""" 8
2380 .el .IP \f(CWtzset\fR 8
2381 .IX Item "tzset"
2382 This is identical to the C function \f(CWtzset()\fR for setting
2383 the current timezone based on the environment variable \f(CW\*(C`TZ\*(C'\fR,
2384 to be used by \f(CWctime()\fR, \f(CWlocaltime()\fR, \f(CWmktime()\fR, and \f(CWstrftime()\fR
2385 functions.
2386 .ie n .IP """umask""" 8
2387 .el .IP \f(CWumask\fR 8
2388 .IX Item "umask"
2389 This is identical to Perl\*(Aqs builtin \f(CWumask()\fR function for setting (and
2390 querying) the file creation permission mask \-\- except that \f(CWPOSIX::umask()\fR
2391 must be provided with an explicit value (rather than relying on an implicit
2392 \&\f(CW$_\fR):
2393 .Sp
2394 .Vb 1
2395 \& $current = umask(); # good
2396 \&
2397 \& $now = POSIX::umask($current); # good
2398 \&
2399 \& $now = POSIX::umask(); # throws exception
2400 .Ve
2401 .Sp
2402 See "umask" in perlfunc.
2403 .ie n .IP """uname""" 8
2404 .el .IP \f(CWuname\fR 8
2405 .IX Item "uname"
2406 Get name of current operating system.
2407 .Sp
2408 .Vb 2
2409 \& ($sysname, $nodename, $release, $version, $machine)
2410 \& = POSIX::uname();
2411 .Ve
2412 .Sp
2413 Note that the actual meanings of the various fields are not
2414 that well standardized, do not expect any great portability.
2415 The \f(CW$sysname\fR might be the name of the operating system,
2416 the \f(CW$nodename\fR might be the name of the host, the \f(CW$release\fR
2417 might be the (major) release number of the operating system,
2418 the \f(CW$version\fR might be the (minor) release number of the
2419 operating system, and the \f(CW$machine\fR might be a hardware identifier.
2420 Maybe.
2421 .ie n .IP """ungetc""" 8
2422 .el .IP \f(CWungetc\fR 8
2423 .IX Item "ungetc"
2424 Not implemented. Use method \f(CWIO::Handle::ungetc()\fR instead.
2425 .ie n .IP """unlink""" 8
2426 .el .IP \f(CWunlink\fR 8
2427 .IX Item "unlink"
2428 This is identical to Perl\*(Aqs builtin \f(CWunlink()\fR function
2429 for removing files, see "unlink" in perlfunc.
2430 .ie n .IP """utime""" 8
2431 .el .IP \f(CWutime\fR 8
2432 .IX Item "utime"
2433 This is identical to Perl\*(Aqs builtin \f(CWutime()\fR function
2434 for changing the time stamps of files and directories,
2435 see "utime" in perlfunc.
2436 .ie n .IP """vfprintf""" 8
2437 .el .IP \f(CWvfprintf\fR 8
2438 .IX Item "vfprintf"
2439 Not implemented. \f(CWvfprintf()\fR is C\-specific, see "printf" in perlfunc instead.
2440 .ie n .IP """vprintf""" 8
2441 .el .IP \f(CWvprintf\fR 8
2442 .IX Item "vprintf"
2443 Not implemented. \f(CWvprintf()\fR is C\-specific, see "printf" in perlfunc instead.
2444 .ie n .IP """vsprintf""" 8
2445 .el .IP \f(CWvsprintf\fR 8
2446 .IX Item "vsprintf"
2447 Not implemented. \f(CWvsprintf()\fR is C\-specific, see "sprintf" in perlfunc instead.
2448 .ie n .IP """wait""" 8
2449 .el .IP \f(CWwait\fR 8
2450 .IX Item "wait"
2451 This is identical to Perl\*(Aqs builtin \f(CWwait()\fR function,
2452 see "wait" in perlfunc.
2453 .ie n .IP """waitpid""" 8
2454 .el .IP \f(CWwaitpid\fR 8
2455 .IX Item "waitpid"
2456 Wait for a child process to change state. This is identical to Perl\*(Aqs
2457 builtin \f(CWwaitpid()\fR function, see "waitpid" in perlfunc.
2458 .Sp
2459 .Vb 2
2460 \& $pid = POSIX::waitpid( \-1, POSIX::WNOHANG );
2461 \& print "status = ", ($? / 256), "\en";
2462 .Ve
2463 .Sp
2464 See "mblen".
2465 .ie n .IP """wctomb""" 8
2466 .el .IP \f(CWwctomb\fR 8
2467 .IX Item "wctomb"
2468 This is the same as the C function \f(CWwctomb()\fR on unthreaded perls. On
2469 threaded perls, it transparently (almost) substitutes the more
2470 thread\-safe \f(CW\*(C`\fR\f(CBwcrtomb\fR\f(CW\|(3)\*(C'\fR, if available, instead of \f(CW\*(C`wctomb\*(C'\fR.
2471 .Sp
2472 Core Perl does not have any support for wide and multibyte locales,
2473 except Unicode UTF\-8 locales. This function, in conjunction with
2474 "mblen" and "mbtowc" may be used to roll your own decoding/encoding
2475 of other types of multi\-byte locales.
2476 .Sp
2477 Use \f(CW\*(C`undef\*(C'\fR as the first parameter to this function to get the effect
2478 of passing NULL as the first parameter to \f(CW\*(C`wctomb\*(C'\fR. This ignores the
2479 second parameter, and resets any shift state to its initial value. The
2480 return value is undefined if \f(CW\*(C`wcrtomb\*(C'\fR was substituted, so you should
2481 never rely on it.
2482 .Sp
2483 When the first parameter is a scalar, the code point contained in the
2484 scalar second parameter is converted into a multi\-byte string and stored
2485 into the first parameter scalar. This is based on the locale that
2486 currently underlies the program, regardless of whether or not the
2487 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
2488 if the code point isn\*(Aqt representable in the current locale. Perl makes
2489 no attempt at hiding from your code any differences in the \f(CW\*(C`errno\*(C'\fR
2490 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
2491 before calling them.
2492 .ie n .IP """write""" 8
2493 .el .IP \f(CWwrite\fR 8
2494 .IX Item "write"
2495 Write to a file. This uses file descriptors such as those obtained by
2496 calling \f(CW\*(C`POSIX::open\*(C'\fR.
2497 .Sp
2498 .Vb 3
2499 \& $fd = POSIX::open( "foo", &POSIX::O_WRONLY );
2500 \& $buf = "hello";
2501 \& $bytes = POSIX::write( $fd, $buf, 5 );
2502 .Ve
2503 .Sp
2504 Returns \f(CW\*(C`undef\*(C'\fR on failure.
2505 .Sp
2506 See also "syswrite" in perlfunc.
2507 .SH CLASSES
2508 .IX Header "CLASSES"
2509 .ie n .SS """POSIX::SigAction"""
2510 .el .SS \f(CWPOSIX::SigAction\fP
2511 .IX Subsection "POSIX::SigAction"
2512 .ie n .IP """new""" 8
2513 .el .IP \f(CWnew\fR 8
2514 .IX Item "new"
2515 Creates a new \f(CW\*(C`POSIX::SigAction\*(C'\fR object which corresponds to the C
2516 \&\f(CW\*(C`struct sigaction\*(C'\fR. This object will be destroyed automatically when
2517 it is no longer needed. The first parameter is the handler, a sub
2518 reference. The second parameter is a \f(CW\*(C`POSIX::SigSet\*(C'\fR object, it
2519 defaults to the empty set. The third parameter contains the
2520 \&\f(CW\*(C`sa_flags\*(C'\fR, it defaults to 0.
2521 .Sp
2522 .Vb 4
2523 \& $sigset = POSIX::SigSet\->new(SIGINT, SIGQUIT);
2524 \& $sigaction = POSIX::SigAction\->new(
2525 \& \e&handler, $sigset, &POSIX::SA_NOCLDSTOP
2526 \& );
2527 .Ve
2528 .Sp
2529 This \f(CW\*(C`POSIX::SigAction\*(C'\fR object is intended for use with the \f(CWPOSIX::sigaction()\fR
2530 function.
2531 .ie n .IP """handler""" 8
2532 .el .IP \f(CWhandler\fR 8
2533 .IX Item "handler"
2534 .PD 0
2535 .ie n .IP """mask""" 8
2536 .el .IP \f(CWmask\fR 8
2537 .IX Item "mask"
2538 .ie n .IP """flags""" 8
2539 .el .IP \f(CWflags\fR 8
2540 .IX Item "flags"
2541 .PD
2542 accessor functions to get/set the values of a SigAction object.
2543 .Sp
2544 .Vb 2
2545 \& $sigset = $sigaction\->mask;
2546 \& $sigaction\->flags(&POSIX::SA_RESTART);
2547 .Ve
2548 .ie n .IP """safe""" 8
2549 .el .IP \f(CWsafe\fR 8
2550 .IX Item "safe"
2551 accessor function for the "safe signals" flag of a SigAction object; see
2552 perlipc for general information on safe (a.k.a. "deferred") signals. If
2553 you wish to handle a signal safely, use this accessor to set the "safe" flag
2554 in the \f(CW\*(C`POSIX::SigAction\*(C'\fR object:
2555 .Sp
2556 .Vb 1
2557 \& $sigaction\->safe(1);
2558 .Ve
2559 .Sp
2560 You may also examine the "safe" flag on the output action object which is
2561 filled in when given as the third parameter to \f(CWPOSIX::sigaction()\fR:
2562 .Sp
2563 .Vb 4
2564 \& sigaction(SIGINT, $new_action, $old_action);
2565 \& if ($old_action\->safe) {
2566 \& # previous SIGINT handler used safe signals
2567 \& }
2568 .Ve
2569 .ie n .SS """POSIX::SigRt"""
2570 .el .SS \f(CWPOSIX::SigRt\fP
2571 .IX Subsection "POSIX::SigRt"
2572 .ie n .IP %SIGRT 8
2573 .el .IP \f(CW%SIGRT\fR 8
2574 .IX Item "%SIGRT"
2575 A hash of the POSIX realtime signal handlers. It is an extension of
2576 the standard \f(CW%SIG\fR, the \f(CW$POSIX::SIGRT{SIGRTMIN}\fR is roughly equivalent
2577 to \f(CW$SIG{SIGRTMIN}\fR, but the right POSIX moves (see below) are made with
2578 the \f(CW\*(C`POSIX::SigSet\*(C'\fR and \f(CW\*(C`POSIX::sigaction\*(C'\fR instead of accessing the \f(CW%SIG\fR.
2579 .Sp
2580 You can set the \f(CW%POSIX::SIGRT\fR elements to set the POSIX realtime
2581 signal handlers, use \f(CW\*(C`delete\*(C'\fR and \f(CW\*(C`exists\*(C'\fR on the elements, and use
2582 \&\f(CW\*(C`scalar\*(C'\fR on the \f(CW%POSIX::SIGRT\fR to find out how many POSIX realtime
2583 signals there are available \f(CW\*(C`(SIGRTMAX\ \-\ SIGRTMIN\ +\ 1\*(C'\fR, the \f(CW\*(C`SIGRTMAX\*(C'\fR is
2584 a valid POSIX realtime signal).
2585 .Sp
2586 Setting the \f(CW%SIGRT\fR elements is equivalent to calling this:
2587 .Sp
2588 .Vb 6
2589 \& sub new {
2590 \& my ($rtsig, $handler, $flags) = @_;
2591 \& my $sigset = POSIX::SigSet($rtsig);
2592 \& my $sigact = POSIX::SigAction\->new($handler,$sigset,$flags);
2593 \& sigaction($rtsig, $sigact);
2594 \& }
2595 .Ve
2596 .Sp
2597 The flags default to zero, if you want something different you can
2598 either use \f(CW\*(C`local\*(C'\fR on \f(CW$POSIX::SigRt::SIGACTION_FLAGS\fR, or you can
2599 derive from POSIX::SigRt and define your own \f(CWnew()\fR (the tied hash
2600 STORE method of the \f(CW%SIGRT\fR calls \f(CW\*(C`new($rtsig, $handler, $SIGACTION_FLAGS)\*(C'\fR,
2601 where the \f(CW$rtsig\fR ranges from zero to \f(CW\*(C`SIGRTMAX\ \-\ SIGRTMIN\ +\ 1)\*(C'\fR.
2602 .Sp
2603 Just as with any signal, you can use \f(CW\*(C`sigaction($rtsig, undef, $oa)\*(C'\fR to
2604 retrieve the installed signal handler (or, rather, the signal action).
2605 .Sp
2606 \&\fBNOTE:\fR whether POSIX realtime signals really work in your system, or
2607 whether Perl has been compiled so that it works with them, is outside
2608 of this discussion.
2609 .ie n .IP """SIGRTMIN""" 8
2610 .el .IP \f(CWSIGRTMIN\fR 8
2611 .IX Item "SIGRTMIN"
2612 Return the minimum POSIX realtime signal number available, or \f(CW\*(C`undef\*(C'\fR
2613 if no POSIX realtime signals are available.
2614 .ie n .IP """SIGRTMAX""" 8
2615 .el .IP \f(CWSIGRTMAX\fR 8
2616 .IX Item "SIGRTMAX"
2617 Return the maximum POSIX realtime signal number available, or \f(CW\*(C`undef\*(C'\fR
2618 if no POSIX realtime signals are available.
2619 .ie n .SS """POSIX::SigSet"""
2620 .el .SS \f(CWPOSIX::SigSet\fP
2621 .IX Subsection "POSIX::SigSet"
2622 .ie n .IP """new""" 8
2623 .el .IP \f(CWnew\fR 8
2624 .IX Item "new"
2625 Create a new SigSet object. This object will be destroyed automatically
2626 when it is no longer needed. Arguments may be supplied to initialize the
2627 set.
2628 .Sp
2629 Create an empty set.
2630 .Sp
2631 .Vb 1
2632 \& $sigset = POSIX::SigSet\->new;
2633 .Ve
2634 .Sp
2635 Create a set with \f(CW\*(C`SIGUSR1\*(C'\fR.
2636 .Sp
2637 .Vb 1
2638 \& $sigset = POSIX::SigSet\->new( &POSIX::SIGUSR1 );
2639 .Ve
2640 .Sp
2641 Throws an error if any of the signals supplied cannot be added to the
2642 set.
2643 .ie n .IP """addset""" 8
2644 .el .IP \f(CWaddset\fR 8
2645 .IX Item "addset"
2646 Add a signal to a SigSet object.
2647 .Sp
2648 .Vb 1
2649 \& $sigset\->addset( &POSIX::SIGUSR2 );
2650 .Ve
2651 .Sp
2652 Returns \f(CW\*(C`undef\*(C'\fR on failure.
2653 .ie n .IP """delset""" 8
2654 .el .IP \f(CWdelset\fR 8
2655 .IX Item "delset"
2656 Remove a signal from the SigSet object.
2657 .Sp
2658 .Vb 1
2659 \& $sigset\->delset( &POSIX::SIGUSR2 );
2660 .Ve
2661 .Sp
2662 Returns \f(CW\*(C`undef\*(C'\fR on failure.
2663 .ie n .IP """emptyset""" 8
2664 .el .IP \f(CWemptyset\fR 8
2665 .IX Item "emptyset"
2666 Initialize the SigSet object to be empty.
2667 .Sp
2668 .Vb 1
2669 \& $sigset\->emptyset();
2670 .Ve
2671 .Sp
2672 Returns \f(CW\*(C`undef\*(C'\fR on failure.
2673 .ie n .IP """fillset""" 8
2674 .el .IP \f(CWfillset\fR 8
2675 .IX Item "fillset"
2676 Initialize the SigSet object to include all signals.
2677 .Sp
2678 .Vb 1
2679 \& $sigset\->fillset();
2680 .Ve
2681 .Sp
2682 Returns \f(CW\*(C`undef\*(C'\fR on failure.
2683 .ie n .IP """ismember""" 8
2684 .el .IP \f(CWismember\fR 8
2685 .IX Item "ismember"
2686 Tests the SigSet object to see if it contains a specific signal.
2687 .Sp
2688 .Vb 3
2689 \& if( $sigset\->ismember( &POSIX::SIGUSR1 ) ){
2690 \& print "contains SIGUSR1\en";
2691 \& }
2692 .Ve
2693 .ie n .SS """POSIX::Termios"""
2694 .el .SS \f(CWPOSIX::Termios\fP
2695 .IX Subsection "POSIX::Termios"
2696 .ie n .IP """new""" 8
2697 .el .IP \f(CWnew\fR 8
2698 .IX Item "new"
2699 Create a new Termios object. This object will be destroyed automatically
2700 when it is no longer needed. A Termios object corresponds to the \f(CW\*(C`termios\*(C'\fR
2701 C struct. \f(CWnew()\fR mallocs a new one, \f(CWgetattr()\fR fills it from a file descriptor,
2702 and \f(CWsetattr()\fR sets a file descriptor\*(Aqs parameters to match Termios\*(Aq contents.
2703 .Sp
2704 .Vb 1
2705 \& $termios = POSIX::Termios\->new;
2706 .Ve
2707 .ie n .IP """getattr""" 8
2708 .el .IP \f(CWgetattr\fR 8
2709 .IX Item "getattr"
2710 Get terminal control attributes.
2711 .Sp
2712 Obtain the attributes for \f(CW\*(C`stdin\*(C'\fR.
2713 .Sp
2714 .Vb 2
2715 \& $termios\->getattr( 0 ) # Recommended for clarity.
2716 \& $termios\->getattr()
2717 .Ve
2718 .Sp
2719 Obtain the attributes for stdout.
2720 .Sp
2721 .Vb 1
2722 \& $termios\->getattr( 1 )
2723 .Ve
2724 .Sp
2725 Returns \f(CW\*(C`undef\*(C'\fR on failure.
2726 .ie n .IP """getcc""" 8
2727 .el .IP \f(CWgetcc\fR 8
2728 .IX Item "getcc"
2729 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
2730 an array so an index must be specified.
2731 .Sp
2732 .Vb 1
2733 \& $c_cc[1] = $termios\->getcc(1);
2734 .Ve
2735 .ie n .IP """getcflag""" 8
2736 .el .IP \f(CWgetcflag\fR 8
2737 .IX Item "getcflag"
2738 Retrieve the \f(CW\*(C`c_cflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
2739 .Sp
2740 .Vb 1
2741 \& $c_cflag = $termios\->getcflag;
2742 .Ve
2743 .ie n .IP """getiflag""" 8
2744 .el .IP \f(CWgetiflag\fR 8
2745 .IX Item "getiflag"
2746 Retrieve the \f(CW\*(C`c_iflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
2747 .Sp
2748 .Vb 1
2749 \& $c_iflag = $termios\->getiflag;
2750 .Ve
2751 .ie n .IP """getispeed""" 8
2752 .el .IP \f(CWgetispeed\fR 8
2753 .IX Item "getispeed"
2754 Retrieve the input baud rate.
2755 .Sp
2756 .Vb 1
2757 \& $ispeed = $termios\->getispeed;
2758 .Ve
2759 .ie n .IP """getlflag""" 8
2760 .el .IP \f(CWgetlflag\fR 8
2761 .IX Item "getlflag"
2762 Retrieve the \f(CW\*(C`c_lflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
2763 .Sp
2764 .Vb 1
2765 \& $c_lflag = $termios\->getlflag;
2766 .Ve
2767 .ie n .IP """getoflag""" 8
2768 .el .IP \f(CWgetoflag\fR 8
2769 .IX Item "getoflag"
2770 Retrieve the \f(CW\*(C`c_oflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
2771 .Sp
2772 .Vb 1
2773 \& $c_oflag = $termios\->getoflag;
2774 .Ve
2775 .ie n .IP """getospeed""" 8
2776 .el .IP \f(CWgetospeed\fR 8
2777 .IX Item "getospeed"
2778 Retrieve the output baud rate.
2779 .Sp
2780 .Vb 1
2781 \& $ospeed = $termios\->getospeed;
2782 .Ve
2783 .ie n .IP """setattr""" 8
2784 .el .IP \f(CWsetattr\fR 8
2785 .IX Item "setattr"
2786 Set terminal control attributes.
2787 .Sp
2788 Set attributes immediately for stdout.
2789 .Sp
2790 .Vb 1
2791 \& $termios\->setattr( 1, &POSIX::TCSANOW );
2792 .Ve
2793 .Sp
2794 Returns \f(CW\*(C`undef\*(C'\fR on failure.
2795 .ie n .IP """setcc""" 8
2796 .el .IP \f(CWsetcc\fR 8
2797 .IX Item "setcc"
2798 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
2799 array so an index must be specified.
2800 .Sp
2801 .Vb 1
2802 \& $termios\->setcc( &POSIX::VEOF, 1 );
2803 .Ve
2804 .ie n .IP """setcflag""" 8
2805 .el .IP \f(CWsetcflag\fR 8
2806 .IX Item "setcflag"
2807 Set the \f(CW\*(C`c_cflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
2808 .Sp
2809 .Vb 1
2810 \& $termios\->setcflag( $c_cflag | &POSIX::CLOCAL );
2811 .Ve
2812 .ie n .IP """setiflag""" 8
2813 .el .IP \f(CWsetiflag\fR 8
2814 .IX Item "setiflag"
2815 Set the \f(CW\*(C`c_iflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
2816 .Sp
2817 .Vb 1
2818 \& $termios\->setiflag( $c_iflag | &POSIX::BRKINT );
2819 .Ve
2820 .ie n .IP """setispeed""" 8
2821 .el .IP \f(CWsetispeed\fR 8
2822 .IX Item "setispeed"
2823 Set the input baud rate.
2824 .Sp
2825 .Vb 1
2826 \& $termios\->setispeed( &POSIX::B9600 );
2827 .Ve
2828 .Sp
2829 Returns \f(CW\*(C`undef\*(C'\fR on failure.
2830 .ie n .IP """setlflag""" 8
2831 .el .IP \f(CWsetlflag\fR 8
2832 .IX Item "setlflag"
2833 Set the \f(CW\*(C`c_lflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
2834 .Sp
2835 .Vb 1
2836 \& $termios\->setlflag( $c_lflag | &POSIX::ECHO );
2837 .Ve
2838 .ie n .IP """setoflag""" 8
2839 .el .IP \f(CWsetoflag\fR 8
2840 .IX Item "setoflag"
2841 Set the \f(CW\*(C`c_oflag\*(C'\fR field of a \f(CW\*(C`termios\*(C'\fR object.
2842 .Sp
2843 .Vb 1
2844 \& $termios\->setoflag( $c_oflag | &POSIX::OPOST );
2845 .Ve
2846 .ie n .IP """setospeed""" 8
2847 .el .IP \f(CWsetospeed\fR 8
2848 .IX Item "setospeed"
2849 Set the output baud rate.
2850 .Sp
2851 .Vb 1
2852 \& $termios\->setospeed( &POSIX::B9600 );
2853 .Ve
2854 .Sp
2855 Returns \f(CW\*(C`undef\*(C'\fR on failure.
2856 .IP "Baud rate values" 8
2857 .IX Item "Baud rate values"
2858 \&\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
2859 .IP "Terminal interface values" 8
2860 .IX Item "Terminal interface values"
2861 \&\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
2862 .ie n .IP """c_cc"" field values" 8
2863 .el .IP "\f(CWc_cc\fR field values" 8
2864 .IX Item "c_cc field values"
2865 \&\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
2866 .ie n .IP """c_cflag"" field values" 8
2867 .el .IP "\f(CWc_cflag\fR field values" 8
2868 .IX Item "c_cflag field values"
2869 \&\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
2870 .ie n .IP """c_iflag"" field values" 8
2871 .el .IP "\f(CWc_iflag\fR field values" 8
2872 .IX Item "c_iflag field values"
2873 \&\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
2874 .ie n .IP """c_lflag"" field values" 8
2875 .el .IP "\f(CWc_lflag\fR field values" 8
2876 .IX Item "c_lflag field values"
2877 \&\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
2878 .ie n .IP """c_oflag"" field values" 8
2879 .el .IP "\f(CWc_oflag\fR field values" 8
2880 .IX Item "c_oflag field values"
2881 \&\f(CW\*(C`OPOST\*(C'\fR
2882 .SH "PATHNAME CONSTANTS"
2883 .IX Header "PATHNAME CONSTANTS"
2884 .IP Constants 8
2885 .IX Item "Constants"
2886 \&\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
2887 \&\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
2888 .SH "POSIX CONSTANTS"
2889 .IX Header "POSIX CONSTANTS"
2890 .IP Constants 8
2891 .IX Item "Constants"
2892 \&\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
2893 \&\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
2894 \&\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
2895 \&\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
2896 \&\f(CW\*(C`_POSIX_TZNAME_MAX\*(C'\fR \f(CW\*(C`_POSIX_VDISABLE\*(C'\fR \f(CW\*(C`_POSIX_VERSION\*(C'\fR
2897 .SH "RESOURCE CONSTANTS"
2898 .IX Header "RESOURCE CONSTANTS"
2899 Imported with the \f(CW\*(C`:sys_resource_h\*(C'\fR tag.
2900 .IP Constants 8
2901 .IX Item "Constants"
2902 Added in Perl v5.28:
2903 .Sp
2904 \&\f(CW\*(C`PRIO_PROCESS\*(C'\fR \f(CW\*(C`PRIO_PGRP\*(C'\fR \f(CW\*(C`PRIO_USER\*(C'\fR
2905 .SH "SYSTEM CONFIGURATION"
2906 .IX Header "SYSTEM CONFIGURATION"
2907 .IP Constants 8
2908 .IX Item "Constants"
2909 \&\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
2910 \&\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
2911 \&\f(CW\*(C`_SC_VERSION\*(C'\fR
2912 .SH ERRNO
2913 .IX Header "ERRNO"
2914 .IP Constants 8
2915 .IX Item "Constants"
2916 \&\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
2917 \&\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
2918 \&\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
2919 \&\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
2920 \&\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
2921 \&\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
2922 \&\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
2923 \&\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
2924 \&\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
2925 \&\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
2926 \&\f(CW\*(C`EWOULDBLOCK\*(C'\fR \f(CW\*(C`EXDEV\*(C'\fR
2927 .SH FCNTL
2928 .IX Header "FCNTL"
2929 .IP Constants 8
2930 .IX Item "Constants"
2931 \&\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
2932 \&\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
2933 \&\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
2934 .SH FLOAT
2935 .IX Header "FLOAT"
2936 .IP Constants 8
2937 .IX Item "Constants"
2938 \&\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
2939 \&\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
2940 \&\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
2941 \&\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
2942 \&\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
2943 .SH "FLOATING\-POINT ENVIRONMENT"
2944 .IX Header "FLOATING-POINT ENVIRONMENT"
2945 .IP Constants 8
2946 .IX Item "Constants"
2947 \&\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
2948 on systems that support them.
2949 .SH LIMITS
2950 .IX Header "LIMITS"
2951 .IP Constants 8
2952 .IX Item "Constants"
2953 \&\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
2954 \&\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
2955 \&\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
2956 \&\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
2957 .SH LOCALE
2958 .IX Header "LOCALE"
2959 .IP Constants 8
2960 .IX Item "Constants"
2961 \&\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
2962 on systems that support them.
2963 .SH MATH
2964 .IX Header "MATH"
2965 .IP Constants 8
2966 .IX Item "Constants"
2967 \&\f(CW\*(C`HUGE_VAL\*(C'\fR
2968 .Sp
2969 Added in Perl v5.22:
2970 .Sp
2971 \&\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
2972 \&\f(CW\*(C`INFINITY\*(C'\fR \f(CW\*(C`NAN\*(C'\fR \f(CW\*(C`Inf\*(C'\fR \f(CW\*(C`NaN\*(C'\fR
2973 \&\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
2974 \&\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
2975 on systems with C99 support.
2976 .SH SIGNAL
2977 .IX Header "SIGNAL"
2978 .IP Constants 8
2979 .IX Item "Constants"
2980 \&\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
2981 \&\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
2982 \&\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
2983 \&\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
2984 \&\f(CW\*(C`SIG_UNBLOCK\*(C'\fR
2985 .Sp
2986 Added in Perl v5.24:
2987 .Sp
2988 \&\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
2989 \&\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
2990 \&\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
2991 \&\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
2992 \&\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
2993 \&\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
2994 .SH STAT
2995 .IX Header "STAT"
2996 .IP Constants 8
2997 .IX Item "Constants"
2998 \&\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
2999 \&\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
3000 .IP Macros 8
3001 .IX Item "Macros"
3002 \&\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
3003 .SH STDLIB
3004 .IX Header "STDLIB"
3005 .IP Constants 8
3006 .IX Item "Constants"
3007 \&\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
3008 .SH STDIO
3009 .IX Header "STDIO"
3010 .IP Constants 8
3011 .IX Item "Constants"
3012 \&\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
3013 .SH TIME
3014 .IX Header "TIME"
3015 .IP Constants 8
3016 .IX Item "Constants"
3017 \&\f(CW\*(C`CLK_TCK\*(C'\fR \f(CW\*(C`CLOCKS_PER_SEC\*(C'\fR
3018 .SH UNISTD
3019 .IX Header "UNISTD"
3020 .IP Constants 8
3021 .IX Item "Constants"
3022 \&\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
3023 .SH WAIT
3024 .IX Header "WAIT"
3025 .IP Constants 8
3026 .IX Item "Constants"
3027 \&\f(CW\*(C`WNOHANG\*(C'\fR \f(CW\*(C`WUNTRACED\*(C'\fR
3028 .RS 8
3029 .ie n .IP """WNOHANG""" 16
3030 .el .IP \f(CWWNOHANG\fR 16
3031 .IX Item "WNOHANG"
3032 Do not suspend the calling process until a child process
3033 changes state but instead return immediately.
3034 .ie n .IP """WUNTRACED""" 16
3035 .el .IP \f(CWWUNTRACED\fR 16
3036 .IX Item "WUNTRACED"
3037 Catch stopped child processes.
3038 .RE
3039 .RS 8
3040 .RE
3041 .IP Macros 8
3042 .IX Item "Macros"
3043 \&\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
3044 .RS 8
3045 .ie n .IP """WIFEXITED""" 16
3046 .el .IP \f(CWWIFEXITED\fR 16
3047 .IX Item "WIFEXITED"
3048 \&\f(CWWIFEXITED(${^CHILD_ERROR_NATIVE})\fR returns true if the child process
3049 exited normally (\f(CWexit()\fR or by falling off the end of \f(CWmain()\fR)
3050 .ie n .IP """WEXITSTATUS""" 16
3051 .el .IP \f(CWWEXITSTATUS\fR 16
3052 .IX Item "WEXITSTATUS"
3053 \&\f(CWWEXITSTATUS(${^CHILD_ERROR_NATIVE})\fR returns the normal exit status of
3054 the child process (only meaningful if \f(CWWIFEXITED(${^CHILD_ERROR_NATIVE})\fR
3055 is true)
3056 .ie n .IP """WIFSIGNALED""" 16
3057 .el .IP \f(CWWIFSIGNALED\fR 16
3058 .IX Item "WIFSIGNALED"
3059 \&\f(CWWIFSIGNALED(${^CHILD_ERROR_NATIVE})\fR returns true if the child process
3060 terminated because of a signal
3061 .ie n .IP """WTERMSIG""" 16
3062 .el .IP \f(CWWTERMSIG\fR 16
3063 .IX Item "WTERMSIG"
3064 \&\f(CWWTERMSIG(${^CHILD_ERROR_NATIVE})\fR returns the signal the child process
3065 terminated for (only meaningful if
3066 \&\f(CWWIFSIGNALED(${^CHILD_ERROR_NATIVE})\fR
3067 is true)
3068 .ie n .IP """WIFSTOPPED""" 16
3069 .el .IP \f(CWWIFSTOPPED\fR 16
3070 .IX Item "WIFSTOPPED"
3071 \&\f(CWWIFSTOPPED(${^CHILD_ERROR_NATIVE})\fR returns true if the child process is
3072 currently stopped (can happen only if you specified the WUNTRACED flag
3073 to \f(CWwaitpid()\fR)
3074 .ie n .IP """WSTOPSIG""" 16
3075 .el .IP \f(CWWSTOPSIG\fR 16
3076 .IX Item "WSTOPSIG"
3077 \&\f(CWWSTOPSIG(${^CHILD_ERROR_NATIVE})\fR returns the signal the child process
3078 was stopped for (only meaningful if
3079 \&\f(CWWIFSTOPPED(${^CHILD_ERROR_NATIVE})\fR
3080 is true)
3081 .RE
3082 .RS 8
3083 .RE
3084 .SH WINSOCK
3085 .IX Header "WINSOCK"
3086 (Windows only.)
3087 .IP Constants 8
3088 .IX Item "Constants"
3089 Added in Perl v5.24:
3090 .Sp
3091 \&\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
3092 \&\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
3093 \&\f(CW\*(C`WSAEPROTOTYPE\*(C'\fR \f(CW\*(C`WSAENOPROTOOPT\*(C'\fR \f(CW\*(C`WSAEPROTONOSUPPORT\*(C'\fR \f(CW\*(C`WSAESOCKTNOSUPPORT\*(C'\fR
3094 \&\f(CW\*(C`WSAEOPNOTSUPP\*(C'\fR \f(CW\*(C`WSAEPFNOSUPPORT\*(C'\fR \f(CW\*(C`WSAEAFNOSUPPORT\*(C'\fR \f(CW\*(C`WSAEADDRINUSE\*(C'\fR
3095 \&\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
3096 \&\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
3097 \&\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
3098 \&\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
3099 \&\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
3100 \&\f(CW\*(C`WSAEINVALIDPROCTABLE\*(C'\fR \f(CW\*(C`WSAEINVALIDPROVIDER\*(C'\fR \f(CW\*(C`WSAEPROVIDERFAILEDINIT\*(C'\fR
3101 \&\f(CW\*(C`WSAEREFUSED\*(C'\fR