Debian Codegraph @

upstream/debian-unstable/man3/POSIX.3perl

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