1POSIX(3pm)             Perl Programmers Reference Guide             POSIX(3pm)
2
3
4

NAME

6       POSIX - Perl interface to IEEE Std 1003.1
7

SYNOPSIS

9           use POSIX ();
10           use POSIX qw(setsid);
11           use POSIX qw(:errno_h :fcntl_h);
12
13           printf "EINTR is %d\n", EINTR;
14
15           $sess_id = POSIX::setsid();
16
17           $fd = POSIX::open($path, O_CREAT|O_EXCL|O_WRONLY, 0644);
18               # note: that's a filedescriptor, *NOT* a filehandle
19

DESCRIPTION

21       The POSIX module permits you to access all (or nearly all) the standard
22       POSIX 1003.1 identifiers.  Many of these identifiers have been given
23       Perl-ish interfaces.
24
25       This document gives a condensed list of the features available in the
26       POSIX module.  Consult your operating system's manpages for general
27       information on most features.  Consult perlfunc for functions which are
28       noted as being identical to Perl's builtin functions.
29
30       The first section describes POSIX functions from the 1003.1
31       specification.  The second section describes some classes for signal
32       objects, TTY objects, and other miscellaneous objects.  The remaining
33       sections list various constants and macros in an organization which
34       roughly follows IEEE Std 1003.1b-1993.
35

CAVEATS

37       Everything is exported by default (with a handful of exceptions).  This
38       is an unfortunate backwards compatibility feature and its use is
39       strongly discouraged.  You should either prevent the exporting (by
40       saying "use POSIX ();", as usual) and then use fully qualified names
41       (e.g. "POSIX::SEEK_END"), or give an explicit import list.  If you do
42       neither and opt for the default (as in "use POSIX;"), you will import
43       hundreds and hundreds of symbols into your namespace.
44
45       A few functions are not implemented because they are C specific.  If
46       you attempt to call these, they will print a message telling you that
47       they aren't implemented, and suggest using the Perl equivalent, should
48       one exist.  For example, trying to access the "setjmp()" call will
49       elicit the message ""setjmp() is C-specific: use eval {} instead"".
50
51       Furthermore, some evil vendors will claim 1003.1 compliance, but in
52       fact are not so: they will not pass the PCTS (POSIX Compliance Test
53       Suites).  For example, one vendor may not define "EDEADLK", or the
54       semantics of the errno values set by open(2) might not be quite right.
55       Perl does not attempt to verify POSIX compliance.  That means you can
56       currently successfully say "use POSIX",  and then later in your program
57       you find that your vendor has been lax and there's no usable "ICANON"
58       macro after all.  This could be construed to be a bug.
59

FUNCTIONS

61       "_exit" This is identical to the C function "_exit()".  It exits the
62               program immediately which means among other things buffered I/O
63               is not flushed.
64
65               Note that when using threads and in Linux this is not a good
66               way to exit a thread because in Linux processes and threads are
67               kind of the same thing (Note: while this is the situation in
68               early 2003 there are projects under way to have threads with
69               more POSIXly semantics in Linux).  If you want not to return
70               from a thread, detach the thread.
71
72       "abort" This is identical to the C function "abort()".  It terminates
73               the process with a "SIGABRT" signal unless caught by a signal
74               handler or if the handler does not return normally (it e.g.
75               does a "longjmp").
76
77       "abs"   This is identical to Perl's builtin "abs()" function, returning
78               the absolute value of its numerical argument.
79
80       "access"
81               Determines the accessibility of a file.
82
83                       if( POSIX::access( "/", &POSIX::R_OK ) ){
84                               print "have read permission\n";
85                       }
86
87               Returns "undef" on failure.  Note: do not use "access()" for
88               security purposes.  Between the "access()" call and the
89               operation you are preparing for the permissions might change: a
90               classic race condition.
91
92       "acos"  This is identical to the C function "acos()", returning the
93               arcus cosine of its numerical argument.  See also Math::Trig.
94
95       "acosh" This is identical to the C function "acosh()", returning the
96               hyperbolic arcus cosine of its numerical argument [C99].  See
97               also Math::Trig.
98
99       "alarm" This is identical to Perl's builtin "alarm()" function, either
100               for arming or disarming the "SIGARLM" timer.
101
102       "asctime"
103               This is identical to the C function "asctime()".  It returns a
104               string of the form
105
106                       "Fri Jun  2 18:22:13 2000\n\0"
107
108               and it is called thusly
109
110                       $asctime = asctime($sec, $min, $hour, $mday, $mon,
111                                          $year, $wday, $yday, $isdst);
112
113               The $mon is zero-based: January equals 0.  The $year is
114               1900-based: 2001 equals 101.  $wday and $yday default to zero
115               (and are usually ignored anyway), and $isdst defaults to -1.
116
117       "asin"  This is identical to the C function "asin()", returning the
118               arcus sine of its numerical argument.  See also Math::Trig.
119
120       "asinh" This is identical to the C function "asinh()", returning the
121               hyperbolic arcus sine of its numerical argument [C99].  See
122               also Math::Trig.
123
124       "assert"
125               Unimplemented, but you can use "die" in perlfunc and the Carp
126               module to achieve similar things.
127
128       "atan"  This is identical to the C function "atan()", returning the
129               arcus tangent of its numerical argument.  See also Math::Trig.
130
131       "atanh" This is identical to the C function "atanh()", returning the
132               hyperbolic arcus tangent of its numerical argument [C99].  See
133               also Math::Trig.
134
135       "atan2" This is identical to Perl's builtin "atan2()" function,
136               returning the arcus tangent defined by its two numerical
137               arguments, the y coordinate and the x coordinate.  See also
138               Math::Trig.
139
140       "atexit"
141               Not implemented.  "atexit()" is C-specific: use "END {}"
142               instead, see perlmod.
143
144       "atof"  Not implemented.  "atof()" is C-specific.  Perl converts
145               strings to numbers transparently.  If you need to force a
146               scalar to a number, add a zero to it.
147
148       "atoi"  Not implemented.  "atoi()" is C-specific.  Perl converts
149               strings to numbers transparently.  If you need to force a
150               scalar to a number, add a zero to it.  If you need to have just
151               the integer part, see "int" in perlfunc.
152
153       "atol"  Not implemented.  "atol()" is C-specific.  Perl converts
154               strings to numbers transparently.  If you need to force a
155               scalar to a number, add a zero to it.  If you need to have just
156               the integer part, see "int" in perlfunc.
157
158       "bsearch"
159               "bsearch()" not supplied.  For doing binary search on
160               wordlists, see Search::Dict.
161
162       "calloc"
163               Not implemented.  "calloc()" is C-specific.  Perl does memory
164               management transparently.
165
166       "cbrt"  The cube root [C99].
167
168       "ceil"  This is identical to the C function "ceil()", returning the
169               smallest integer value greater than or equal to the given
170               numerical argument.
171
172       "chdir" This is identical to Perl's builtin "chdir()" function,
173               allowing one to change the working (default) directory, see
174               "chdir" in perlfunc.
175
176       "chmod" This is identical to Perl's builtin "chmod()" function,
177               allowing one to change file and directory permissions, see
178               "chmod" in perlfunc.
179
180       "chown" This is identical to Perl's builtin "chown()" function,
181               allowing one to change file and directory owners and groups,
182               see "chown" in perlfunc.
183
184       "clearerr"
185               Not implemented.  Use the method "IO::Handle::clearerr()"
186               instead, to reset the error state (if any) and EOF state (if
187               any) of the given stream.
188
189       "clock" This is identical to the C function "clock()", returning the
190               amount of spent processor time in microseconds.
191
192       "close" Close the file.  This uses file descriptors such as those
193               obtained by calling "POSIX::open".
194
195                       $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
196                       POSIX::close( $fd );
197
198               Returns "undef" on failure.
199
200               See also "close" in perlfunc.
201
202       "closedir"
203               This is identical to Perl's builtin "closedir()" function for
204               closing a directory handle, see "closedir" in perlfunc.
205
206       "cos"   This is identical to Perl's builtin "cos()" function, for
207               returning the cosine of its numerical argument, see "cos" in
208               perlfunc.  See also Math::Trig.
209
210       "cosh"  This is identical to the C function "cosh()", for returning the
211               hyperbolic cosine of its numeric argument.  See also
212               Math::Trig.
213
214       "copysign"
215               Returns "x" but with the sign of "y" [C99].
216
217                $x_with_sign_of_y = POSIX::copysign($x, $y);
218
219               See also "signbit".
220
221       "creat" Create a new file.  This returns a file descriptor like the
222               ones returned by "POSIX::open".  Use "POSIX::close" to close
223               the file.
224
225                       $fd = POSIX::creat( "foo", 0611 );
226                       POSIX::close( $fd );
227
228               See also "sysopen" in perlfunc and its "O_CREAT" flag.
229
230       "ctermid"
231               Generates the path name for the controlling terminal.
232
233                       $path = POSIX::ctermid();
234
235       "ctime" This is identical to the C function "ctime()" and equivalent to
236               "asctime(localtime(...))", see "asctime" and "localtime".
237
238       "cuserid"
239               Get the login name of the owner of the current process.
240
241                       $name = POSIX::cuserid();
242
243       "difftime"
244               This is identical to the C function "difftime()", for returning
245               the time difference (in seconds) between two times (as returned
246               by "time()"), see "time".
247
248       "div"   Not implemented.  "div()" is C-specific, use "int" in perlfunc
249               on the usual "/" division and the modulus "%".
250
251       "dup"   This is similar to the C function "dup()", for duplicating a
252               file descriptor.
253
254               This uses file descriptors such as those obtained by calling
255               "POSIX::open".
256
257               Returns "undef" on failure.
258
259       "dup2"  This is similar to the C function "dup2()", for duplicating a
260               file descriptor to an another known file descriptor.
261
262               This uses file descriptors such as those obtained by calling
263               "POSIX::open".
264
265               Returns "undef" on failure.
266
267       "erf"   The error function [C99].
268
269       "erfc"  The complementary error function [C99].
270
271       "errno" Returns the value of errno.
272
273                       $errno = POSIX::errno();
274
275               This identical to the numerical values of the $!, see "$ERRNO"
276               in perlvar.
277
278       "execl" Not implemented.  "execl()" is C-specific, see "exec" in
279               perlfunc.
280
281       "execle"
282               Not implemented.  "execle()" is C-specific, see "exec" in
283               perlfunc.
284
285       "execlp"
286               Not implemented.  "execlp()" is C-specific, see "exec" in
287               perlfunc.
288
289       "execv" Not implemented.  "execv()" is C-specific, see "exec" in
290               perlfunc.
291
292       "execve"
293               Not implemented.  "execve()" is C-specific, see "exec" in
294               perlfunc.
295
296       "execvp"
297               Not implemented.  "execvp()" is C-specific, see "exec" in
298               perlfunc.
299
300       "exit"  This is identical to Perl's builtin "exit()" function for
301               exiting the program, see "exit" in perlfunc.
302
303       "exp"   This is identical to Perl's builtin "exp()" function for
304               returning the exponent (e-based) of the numerical argument, see
305               "exp" in perlfunc.
306
307       "expm1" Equivalent to "exp(x) - 1", but more precise for small argument
308               values [C99].
309
310               See also "log1p".
311
312       "fabs"  This is identical to Perl's builtin "abs()" function for
313               returning the absolute value of the numerical argument, see
314               "abs" in perlfunc.
315
316       "fclose"
317               Not implemented.  Use method "IO::Handle::close()" instead, or
318               see "close" in perlfunc.
319
320       "fcntl" This is identical to Perl's builtin "fcntl()" function, see
321               "fcntl" in perlfunc.
322
323       "fdopen"
324               Not implemented.  Use method "IO::Handle::new_from_fd()"
325               instead, or see "open" in perlfunc.
326
327       "feof"  Not implemented.  Use method "IO::Handle::eof()" instead, or
328               see "eof" in perlfunc.
329
330       "ferror"
331               Not implemented.  Use method "IO::Handle::error()" instead.
332
333       "fflush"
334               Not implemented.  Use method "IO::Handle::flush()" instead.
335               See also ""$OUTPUT_AUTOFLUSH" in perlvar".
336
337       "fgetc" Not implemented.  Use method "IO::Handle::getc()" instead, or
338               see "read" in perlfunc.
339
340       "fgetpos"
341               Not implemented.  Use method "IO::Seekable::getpos()" instead,
342               or see "seek" in perlfunc.
343
344       "fgets" Not implemented.  Use method "IO::Handle::gets()" instead.
345               Similar to <>, also known as "readline" in perlfunc.
346
347       "fileno"
348               Not implemented.  Use method "IO::Handle::fileno()" instead, or
349               see "fileno" in perlfunc.
350
351       "floor" This is identical to the C function "floor()", returning the
352               largest integer value less than or equal to the numerical
353               argument.
354
355       "fdim"  "Positive difference", "x - y" if "x > y", zero otherwise
356               [C99].
357
358       "fegetround"
359               Returns the current floating point rounding mode, one of
360
361                 FE_TONEAREST FE_TOWARDZERO FE_UPWARD FE_UPWARD
362
363               "FE_TONEAREST" is like "round", "FE_TOWARDZERO" is like "trunc"
364               [C99].
365
366       "fesetround"
367               Sets the floating point rounding mode, see "fegetround" [C99].
368
369       "fma"   "Fused multiply-add", "x * y + z", possibly faster (and less
370               lossy) than the explicit two operations [C99].
371
372                my $fused = POSIX::fma($x, $y, $z);
373
374       "fmax"  Maximum of "x" and "y", except when either is "NaN", returns
375               the other [C99].
376
377                my $min = POSIX::fmax($x, $y);
378
379       "fmin"  Minimum of "x" and "y", except when either is "NaN", returns
380               the other [C99].
381
382                my $min = POSIX::fmin($x, $y);
383
384       "fmod"  This is identical to the C function "fmod()".
385
386                       $r = fmod($x, $y);
387
388               It returns the remainder "$r = $x - $n*$y", where
389               "$n = trunc($x/$y)".  The $r has the same sign as $x and
390               magnitude (absolute value) less than the magnitude of $y.
391
392       "fopen" Not implemented.  Use method "IO::File::open()" instead, or see
393               "open" in perlfunc.
394
395       "fork"  This is identical to Perl's builtin "fork()" function for
396               duplicating the current process, see "fork" in perlfunc and
397               perlfork if you are in Windows.
398
399       "fpathconf"
400               Retrieves the value of a configurable limit on a file or
401               directory.  This uses file descriptors such as those obtained
402               by calling "POSIX::open".
403
404               The following will determine the maximum length of the longest
405               allowable pathname on the filesystem which holds /var/foo.
406
407                       $fd = POSIX::open( "/var/foo", &POSIX::O_RDONLY );
408                       $path_max = POSIX::fpathconf($fd, &POSIX::_PC_PATH_MAX);
409
410               Returns "undef" on failure.
411
412       "fpclassify"
413               Returns one of
414
415                 FP_NORMAL FP_ZERO FP_SUBNORMAL FP_INFINITE FP_NAN
416
417               telling the class of the argument [C99].  "FP_INFINITE" is
418               positive or negative infinity, "FP_NAN" is not-a-number.
419               "FP_SUBNORMAL" means subnormal numbers (also known as
420               denormals), very small numbers with low precision. "FP_ZERO" is
421               zero.  "FP_NORMAL" is all the rest.
422
423       "fprintf"
424               Not implemented.  "fprintf()" is C-specific, see "printf" in
425               perlfunc instead.
426
427       "fputc" Not implemented.  "fputc()" is C-specific, see "print" in
428               perlfunc instead.
429
430       "fputs" Not implemented.  "fputs()" is C-specific, see "print" in
431               perlfunc instead.
432
433       "fread" Not implemented.  "fread()" is C-specific, see "read" in
434               perlfunc instead.
435
436       "free"  Not implemented.  "free()" is C-specific.  Perl does memory
437               management transparently.
438
439       "freopen"
440               Not implemented.  "freopen()" is C-specific, see "open" in
441               perlfunc instead.
442
443       "frexp" Return the mantissa and exponent of a floating-point number.
444
445                       ($mantissa, $exponent) = POSIX::frexp( 1.234e56 );
446
447       "fscanf"
448               Not implemented.  "fscanf()" is C-specific, use <> and regular
449               expressions instead.
450
451       "fseek" Not implemented.  Use method "IO::Seekable::seek()" instead, or
452               see "seek" in perlfunc.
453
454       "fsetpos"
455               Not implemented.  Use method "IO::Seekable::setpos()" instead,
456               or seek "seek" in perlfunc.
457
458       "fstat" Get file status.  This uses file descriptors such as those
459               obtained by calling "POSIX::open".  The data returned is
460               identical to the data from Perl's builtin "stat" function.
461
462                       $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
463                       @stats = POSIX::fstat( $fd );
464
465       "fsync" Not implemented.  Use method "IO::Handle::sync()" instead.
466
467       "ftell" Not implemented.  Use method "IO::Seekable::tell()" instead, or
468               see "tell" in perlfunc.
469
470       "fwrite"
471               Not implemented.  "fwrite()" is C-specific, see "print" in
472               perlfunc instead.
473
474       "getc"  This is identical to Perl's builtin "getc()" function, see
475               "getc" in perlfunc.
476
477       "getchar"
478               Returns one character from STDIN.  Identical to Perl's
479               "getc()", see "getc" in perlfunc.
480
481       "getcwd"
482               Returns the name of the current working directory.  See also
483               Cwd.
484
485       "getegid"
486               Returns the effective group identifier.  Similar to Perl' s
487               builtin variable $(, see "$EGID" in perlvar.
488
489       "getenv"
490               Returns the value of the specified environment variable.  The
491               same information is available through the %ENV array.
492
493       "geteuid"
494               Returns the effective user identifier.  Identical to Perl's
495               builtin $> variable, see "$EUID" in perlvar.
496
497       "getgid"
498               Returns the user's real group identifier.  Similar to Perl's
499               builtin variable $), see "$GID" in perlvar.
500
501       "getgrgid"
502               This is identical to Perl's builtin "getgrgid()" function for
503               returning group entries by group identifiers, see "getgrgid" in
504               perlfunc.
505
506       "getgrnam"
507               This is identical to Perl's builtin "getgrnam()" function for
508               returning group entries by group names, see "getgrnam" in
509               perlfunc.
510
511       "getgroups"
512               Returns the ids of the user's supplementary groups.  Similar to
513               Perl's builtin variable $), see "$GID" in perlvar.
514
515       "getlogin"
516               This is identical to Perl's builtin "getlogin()" function for
517               returning the user name associated with the current session,
518               see "getlogin" in perlfunc.
519
520       "getpayload"
521                       use POSIX ':nan_payload';
522                       getpayload($var)
523
524               Returns the "NaN" payload.
525
526               Note the API instability warning in "setpayload".
527
528               See "nan" for more discussion about "NaN".
529
530       "getpgrp"
531               This is identical to Perl's builtin "getpgrp()" function for
532               returning the process group identifier of the current process,
533               see "getpgrp" in perlfunc.
534
535       "getpid"
536               Returns the process identifier.  Identical to Perl's builtin
537               variable $$, see "$PID" in perlvar.
538
539       "getppid"
540               This is identical to Perl's builtin "getppid()" function for
541               returning the process identifier of the parent process of the
542               current process , see "getppid" in perlfunc.
543
544       "getpwnam"
545               This is identical to Perl's builtin "getpwnam()" function for
546               returning user entries by user names, see "getpwnam" in
547               perlfunc.
548
549       "getpwuid"
550               This is identical to Perl's builtin "getpwuid()" function for
551               returning user entries by user identifiers, see "getpwuid" in
552               perlfunc.
553
554       "gets"  Returns one line from "STDIN", similar to <>, also known as the
555               "readline()" function, see "readline" in perlfunc.
556
557               NOTE: if you have C programs that still use "gets()", be very
558               afraid.  The "gets()" function is a source of endless grief
559               because it has no buffer overrun checks.  It should never be
560               used.  The "fgets()" function should be preferred instead.
561
562       "getuid"
563               Returns the user's identifier.  Identical to Perl's builtin $<
564               variable, see "$UID" in perlvar.
565
566       "gmtime"
567               This is identical to Perl's builtin "gmtime()" function for
568               converting seconds since the epoch to a date in Greenwich Mean
569               Time, see "gmtime" in perlfunc.
570
571       "hypot" Equivalent to "sqrt(x * x + y * y)" except more stable on very
572               large or very small arguments [C99].
573
574       "ilogb" Integer binary logarithm [C99]
575
576               For example "ilogb(20)" is 4, as an integer.
577
578               See also "logb".
579
580       "Inf"   The infinity as a constant:
581
582                  use POSIX qw(Inf);
583                  my $pos_inf = +Inf;  # Or just Inf.
584                  my $neg_inf = -Inf;
585
586               See also "isinf", and "fpclassify".
587
588       "isalnum"
589               This function has been removed as of v5.24.  It was very
590               similar to matching against "qr/ ^ [[:alnum:]]+ $ /x", which
591               you should convert to use instead.  See "POSIX Character
592               Classes" in perlrecharclass.
593
594       "isalpha"
595               This function has been removed as of v5.24.  It was very
596               similar to matching against "qr/ ^ [[:alpha:]]+ $ /x", which
597               you should convert to use instead.  See "POSIX Character
598               Classes" in perlrecharclass.
599
600       "isatty"
601               Returns a boolean indicating whether the specified filehandle
602               is connected to a tty.  Similar to the "-t" operator, see "-X"
603               in perlfunc.
604
605       "iscntrl"
606               This function has been removed as of v5.24.  It was very
607               similar to matching against "qr/ ^ [[:cntrl:]]+ $ /x", which
608               you should convert to use instead.  See "POSIX Character
609               Classes" in perlrecharclass.
610
611       "isdigit"
612               This function has been removed as of v5.24.  It was very
613               similar to matching against "qr/ ^ [[:digit:]]+ $ /x", which
614               you should convert to use instead.  See "POSIX Character
615               Classes" in perlrecharclass.
616
617       "isfinite"
618               Returns true if the argument is a finite number (that is, not
619               an infinity, or the not-a-number) [C99].
620
621               See also "isinf", "isnan", and "fpclassify".
622
623       "isgraph"
624               This function has been removed as of v5.24.  It was very
625               similar to matching against "qr/ ^ [[:graph:]]+ $ /x", which
626               you should convert to use instead.  See "POSIX Character
627               Classes" in perlrecharclass.
628
629       "isgreater"
630               (Also "isgreaterequal", "isless", "islessequal",
631               "islessgreater", "isunordered")
632
633               Floating point comparisons which handle the "NaN" [C99].
634
635       "isinf" Returns true if the argument is an infinity (positive or
636               negative) [C99].
637
638               See also "Inf", "isnan", "isfinite", and "fpclassify".
639
640       "islower"
641               This function has been removed as of v5.24.  It was very
642               similar to matching against "qr/ ^ [[:lower:]]+ $ /x", which
643               you should convert to use instead.  See "POSIX Character
644               Classes" in perlrecharclass.
645
646       "isnan" Returns true if the argument is "NaN" (not-a-number) [C99].
647
648               Note that you cannot test for ""NaN"-ness" with
649
650                  $x == $x
651
652               since the "NaN" is not equivalent to anything, including
653               itself.
654
655               See also "nan", "NaN", "isinf", and "fpclassify".
656
657       "isnormal"
658               Returns true if the argument is normal (that is, not a
659               subnormal/denormal, and not an infinity, or a not-a-number)
660               [C99].
661
662               See also "isfinite", and "fpclassify".
663
664       "isprint"
665               This function has been removed as of v5.24.  It was very
666               similar to matching against "qr/ ^ [[:print:]]+ $ /x", which
667               you should convert to use instead.  See "POSIX Character
668               Classes" in perlrecharclass.
669
670       "ispunct"
671               This function has been removed as of v5.24.  It was very
672               similar to matching against "qr/ ^ [[:punct:]]+ $ /x", which
673               you should convert to use instead.  See "POSIX Character
674               Classes" in perlrecharclass.
675
676       "issignaling"
677                       use POSIX ':nan_payload';
678                       issignaling($var, $payload)
679
680               Return true if the argument is a signaling NaN.
681
682               Note the API instability warning in "setpayload".
683
684               See "nan" for more discussion about "NaN".
685
686       "isspace"
687               This function has been removed as of v5.24.  It was very
688               similar to matching against "qr/ ^ [[:space:]]+ $ /x", which
689               you should convert to use instead.  See "POSIX Character
690               Classes" in perlrecharclass.
691
692       "isupper"
693               This function has been removed as of v5.24.  It was very
694               similar to matching against "qr/ ^ [[:upper:]]+ $ /x", which
695               you should convert to use instead.  See "POSIX Character
696               Classes" in perlrecharclass.
697
698       "isxdigit"
699               This function has been removed as of v5.24.  It was very
700               similar to matching against "qr/ ^ [[:xdigit:]]+ $ /x", which
701               you should convert to use instead.  See "POSIX Character
702               Classes" in perlrecharclass.
703
704       "j0"
705       "j1"
706       "jn"
707       "y0"
708       "y1"
709       "yn"    The Bessel function of the first kind of the order zero.
710
711       "kill"  This is identical to Perl's builtin "kill()" function for
712               sending signals to processes (often to terminate them), see
713               "kill" in perlfunc.
714
715       "labs"  Not implemented.  (For returning absolute values of long
716               integers.)  "labs()" is C-specific, see "abs" in perlfunc
717               instead.
718
719       "lchown"
720               This is identical to the C function, except the order of
721               arguments is consistent with Perl's builtin "chown()" with the
722               added restriction of only one path, not a list of paths.  Does
723               the same thing as the "chown()" function but changes the owner
724               of a symbolic link instead of the file the symbolic link points
725               to.
726
727                POSIX::lchown($uid, $gid, $file_path);
728
729       "ldexp" This is identical to the C function "ldexp()" for multiplying
730               floating point numbers with powers of two.
731
732                       $x_quadrupled = POSIX::ldexp($x, 2);
733
734       "ldiv"  Not implemented.  (For computing dividends of long integers.)
735               "ldiv()" is C-specific, use "/" and "int()" instead.
736
737       "lgamma"
738               The logarithm of the Gamma function [C99].
739
740               See also "tgamma".
741
742       "log1p" Equivalent to "log(1 + x)", but more stable results for small
743               argument values [C99].
744
745       "log2"  Logarithm base two [C99].
746
747               See also "expm1".
748
749       "logb"  Integer binary logarithm [C99].
750
751               For example "logb(20)" is 4, as a floating point number.
752
753               See also "ilogb".
754
755       "link"  This is identical to Perl's builtin "link()" function for
756               creating hard links into files, see "link" in perlfunc.
757
758       "localeconv"
759               Get numeric formatting information.  Returns a reference to a
760               hash containing the current underlying locale's formatting
761               values.  Users of this function should also read perllocale,
762               which provides a comprehensive discussion of Perl locale
763               handling, including a section devoted to this function.
764
765               Here is how to query the database for the de (Deutsch or
766               German) locale.
767
768                       my $loc = POSIX::setlocale( &POSIX::LC_ALL, "de" );
769                       print "Locale: \"$loc\"\n";
770                       my $lconv = POSIX::localeconv();
771                       foreach my $property (qw(
772                               decimal_point
773                               thousands_sep
774                               grouping
775                               int_curr_symbol
776                               currency_symbol
777                               mon_decimal_point
778                               mon_thousands_sep
779                               mon_grouping
780                               positive_sign
781                               negative_sign
782                               int_frac_digits
783                               frac_digits
784                               p_cs_precedes
785                               p_sep_by_space
786                               n_cs_precedes
787                               n_sep_by_space
788                               p_sign_posn
789                               n_sign_posn
790                               int_p_cs_precedes
791                               int_p_sep_by_space
792                               int_n_cs_precedes
793                               int_n_sep_by_space
794                               int_p_sign_posn
795                               int_n_sign_posn
796                       ))
797                       {
798                               printf qq(%s: "%s",\n),
799                                       $property, $lconv->{$property};
800                       }
801
802               The members whose names begin with "int_p_" and "int_n_" were
803               added by POSIX.1-2008 and are only available on systems that
804               support them.
805
806       "localtime"
807               This is identical to Perl's builtin "localtime()" function for
808               converting seconds since the epoch to a date see "localtime" in
809               perlfunc.
810
811       "log"   This is identical to Perl's builtin "log()" function, returning
812               the natural (e-based) logarithm of the numerical argument, see
813               "log" in perlfunc.
814
815       "log10" This is identical to the C function "log10()", returning the
816               10-base logarithm of the numerical argument.  You can also use
817
818                   sub log10 { log($_[0]) / log(10) }
819
820               or
821
822                   sub log10 { log($_[0]) / 2.30258509299405 }
823
824               or
825
826                   sub log10 { log($_[0]) * 0.434294481903252 }
827
828       "longjmp"
829               Not implemented.  "longjmp()" is C-specific: use "die" in
830               perlfunc instead.
831
832       "lseek" Move the file's read/write position.  This uses file
833               descriptors such as those obtained by calling "POSIX::open".
834
835                       $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
836                       $off_t = POSIX::lseek( $fd, 0, &POSIX::SEEK_SET );
837
838               Returns "undef" on failure.
839
840       "lrint" Depending on the current floating point rounding mode, rounds
841               the argument either toward nearest (like "round"), toward zero
842               (like "trunc"), downward (toward negative infinity), or upward
843               (toward positive infinity) [C99].
844
845               For the rounding mode, see "fegetround".
846
847       "lround"
848               Like "round", but as integer, as opposed to floating point
849               [C99].
850
851               See also "ceil", "floor", "trunc".
852
853               Owing to an oversight, this is not currently exported by
854               default, or as part of the ":math_h_c99" export tag; importing
855               it must therefore be done by explicit name.
856
857       "malloc"
858               Not implemented.  "malloc()" is C-specific.  Perl does memory
859               management transparently.
860
861       "mblen" This is identical to the C function "mblen()".
862
863               Core Perl does not have any support for the wide and multibyte
864               characters of the C standards, except under UTF-8 locales, so
865               this might be a rather useless function.
866
867               However, Perl supports Unicode, see perluniintro.
868
869       "mbstowcs"
870               This is identical to the C function "mbstowcs()".
871
872               See "mblen".
873
874       "mbtowc"
875               This is identical to the C function "mbtowc()".
876
877               See "mblen".
878
879       "memchr"
880               Not implemented.  "memchr()" is C-specific, see "index" in
881               perlfunc instead.
882
883       "memcmp"
884               Not implemented.  "memcmp()" is C-specific, use "eq" instead,
885               see perlop.
886
887       "memcpy"
888               Not implemented.  "memcpy()" is C-specific, use "=", see
889               perlop, or see "substr" in perlfunc.
890
891       "memmove"
892               Not implemented.  "memmove()" is C-specific, use "=", see
893               perlop, or see "substr" in perlfunc.
894
895       "memset"
896               Not implemented.  "memset()" is C-specific, use "x" instead,
897               see perlop.
898
899       "mkdir" This is identical to Perl's builtin "mkdir()" function for
900               creating directories, see "mkdir" in perlfunc.
901
902       "mkfifo"
903               This is similar to the C function "mkfifo()" for creating FIFO
904               special files.
905
906                       if (mkfifo($path, $mode)) { ....
907
908               Returns "undef" on failure.  The $mode is similar to the mode
909               of "mkdir()", see "mkdir" in perlfunc, though for "mkfifo" you
910               must specify the $mode.
911
912       "mktime"
913               Convert date/time info to a calendar time.
914
915               Synopsis:
916
917                       mktime(sec, min, hour, mday, mon, year, wday = 0,
918                              yday = 0, isdst = -1)
919
920               The month ("mon"), weekday ("wday"), and yearday ("yday") begin
921               at zero, i.e., January is 0, not 1; Sunday is 0, not 1; January
922               1st is 0, not 1.  The year ("year") is given in years since
923               1900; i.e., the year 1995 is 95; the year 2001 is 101.  Consult
924               your system's "mktime()" manpage for details about these and
925               the other arguments.
926
927               Calendar time for December 12, 1995, at 10:30 am.
928
929                       $time_t = POSIX::mktime( 0, 30, 10, 12, 11, 95 );
930                       print "Date = ", POSIX::ctime($time_t);
931
932               Returns "undef" on failure.
933
934       "modf"  Return the integral and fractional parts of a floating-point
935               number.
936
937                       ($fractional, $integral) = POSIX::modf( 3.14 );
938
939               See also "round".
940
941       "NaN"   The not-a-number as a constant:
942
943                  use POSIX qw(NaN);
944                  my $nan = NaN;
945
946               See also "nan", "/isnan", and "fpclassify".
947
948       "nan"
949                  my $nan = nan();
950
951               Returns "NaN", not-a-number [C99].
952
953               The returned NaN is always a quiet NaN, as opposed to
954               signaling.
955
956               With an argument, can be used to generate a NaN with payload.
957               The argument is first interpreted as a floating point number,
958               but then any fractional parts are truncated (towards zero), and
959               the value is interpreted as an unsigned integer.  The bits of
960               this integer are stored in the unused bits of the NaN.
961
962               The result has a dual nature: it is a NaN, but it also carries
963               the integer inside it.  The integer can be retrieved with
964               "getpayload".  Note, though, that the payload is not
965               propagated, not even on copies, and definitely not in
966               arithmetic operations.
967
968               How many bits fit in the NaN depends on what kind of floating
969               points are being used, but on the most common platforms (64-bit
970               IEEE 754, or the x86 80-bit long doubles) there are 51 and 61
971               bits available, respectively.  (There would be 52 and 62, but
972               the quiet/signaling bit of NaNs takes away one.)  However,
973               because of the floating-point-to- integer-and-back conversions,
974               please test carefully whether you get back what you put in.  If
975               your integers are only 32 bits wide, you probably should not
976               rely on more than 32 bits of payload.
977
978               Whether a "signaling" NaN is in any way different from a
979               "quiet" NaN, depends on the platform.  Also note that the
980               payload of the default NaN (no argument to nan()) is not
981               necessarily zero, use "setpayload" to explicitly set the
982               payload.  On some platforms like the 32-bit x86, (unless using
983               the 80-bit long doubles) the signaling bit is not supported at
984               all.
985
986               See also "isnan", "NaN", "setpayload" and "issignaling".
987
988       "nearbyint"
989               Returns the nearest integer to the argument, according to the
990               current rounding mode (see "fegetround") [C99].
991
992       "nextafter"
993               Returns the next representable floating point number after "x"
994               in the direction of "y" [C99].
995
996                my $nextafter = POSIX::nextafter($x, $y);
997
998               Like "nexttoward", but potentially less accurate.
999
1000       "nexttoward"
1001               Returns the next representable floating point number after "x"
1002               in the direction of "y" [C99].
1003
1004                my $nexttoward = POSIX::nexttoward($x, $y);
1005
1006               Like "nextafter", but potentially more accurate.
1007
1008       "nice"  This is similar to the C function "nice()", for changing the
1009               scheduling preference of the current process.  Positive
1010               arguments mean a more polite process, negative values a more
1011               needy process.  Normal (non-root) user processes can only
1012               change towards being more polite.
1013
1014               Returns "undef" on failure.
1015
1016       "offsetof"
1017               Not implemented.  "offsetof()" is C-specific, you probably want
1018               to see "pack" in perlfunc instead.
1019
1020       "open"  Open a file for reading for writing.  This returns file
1021               descriptors, not Perl filehandles.  Use "POSIX::close" to close
1022               the file.
1023
1024               Open a file read-only with mode 0666.
1025
1026                       $fd = POSIX::open( "foo" );
1027
1028               Open a file for read and write.
1029
1030                       $fd = POSIX::open( "foo", &POSIX::O_RDWR );
1031
1032               Open a file for write, with truncation.
1033
1034                       $fd = POSIX::open(
1035                               "foo", &POSIX::O_WRONLY | &POSIX::O_TRUNC
1036                       );
1037
1038               Create a new file with mode 0640.  Set up the file for writing.
1039
1040                       $fd = POSIX::open(
1041                               "foo", &POSIX::O_CREAT | &POSIX::O_WRONLY, 0640
1042                       );
1043
1044               Returns "undef" on failure.
1045
1046               See also "sysopen" in perlfunc.
1047
1048       "opendir"
1049               Open a directory for reading.
1050
1051                       $dir = POSIX::opendir( "/var" );
1052                       @files = POSIX::readdir( $dir );
1053                       POSIX::closedir( $dir );
1054
1055               Returns "undef" on failure.
1056
1057       "pathconf"
1058               Retrieves the value of a configurable limit on a file or
1059               directory.
1060
1061               The following will determine the maximum length of the longest
1062               allowable pathname on the filesystem which holds "/var".
1063
1064                       $path_max = POSIX::pathconf( "/var",
1065                                                     &POSIX::_PC_PATH_MAX );
1066
1067               Returns "undef" on failure.
1068
1069       "pause" This is similar to the C function "pause()", which suspends the
1070               execution of the current process until a signal is received.
1071
1072               Returns "undef" on failure.
1073
1074       "perror"
1075               This is identical to the C function "perror()", which outputs
1076               to the standard error stream the specified message followed by
1077               ": " and the current error string.  Use the "warn()" function
1078               and the $!  variable instead, see "warn" in perlfunc and
1079               "$ERRNO" in perlvar.
1080
1081       "pipe"  Create an interprocess channel.  This returns file descriptors
1082               like those returned by "POSIX::open".
1083
1084                       my ($read, $write) = POSIX::pipe();
1085                       POSIX::write( $write, "hello", 5 );
1086                       POSIX::read( $read, $buf, 5 );
1087
1088               See also "pipe" in perlfunc.
1089
1090       "pow"   Computes $x raised to the power $exponent.
1091
1092                       $ret = POSIX::pow( $x, $exponent );
1093
1094               You can also use the "**" operator, see perlop.
1095
1096       "printf"
1097               Formats and prints the specified arguments to "STDOUT".  See
1098               also "printf" in perlfunc.
1099
1100       "putc"  Not implemented.  "putc()" is C-specific, see "print" in
1101               perlfunc instead.
1102
1103       "putchar"
1104               Not implemented.  "putchar()" is C-specific, see "print" in
1105               perlfunc instead.
1106
1107       "puts"  Not implemented.  "puts()" is C-specific, see "print" in
1108               perlfunc instead.
1109
1110       "qsort" Not implemented.  "qsort()" is C-specific, see "sort" in
1111               perlfunc instead.
1112
1113       "raise" Sends the specified signal to the current process.  See also
1114               "kill" in perlfunc and the $$ in "$PID" in perlvar.
1115
1116       "rand"  Not implemented.  "rand()" is non-portable, see "rand" in
1117               perlfunc instead.
1118
1119       "read"  Read from a file.  This uses file descriptors such as those
1120               obtained by calling "POSIX::open".  If the buffer $buf is not
1121               large enough for the read then Perl will extend it to make room
1122               for the request.
1123
1124                       $fd = POSIX::open( "foo", &POSIX::O_RDONLY );
1125                       $bytes = POSIX::read( $fd, $buf, 3 );
1126
1127               Returns "undef" on failure.
1128
1129               See also "sysread" in perlfunc.
1130
1131       "readdir"
1132               This is identical to Perl's builtin "readdir()" function for
1133               reading directory entries, see "readdir" in perlfunc.
1134
1135       "realloc"
1136               Not implemented.  "realloc()" is C-specific.  Perl does memory
1137               management transparently.
1138
1139       "remainder"
1140               Given "x" and "y", returns the value "x - n*y", where "n" is
1141               the integer closest to "x"/"y". [C99]
1142
1143                my $remainder = POSIX::remainder($x, $y)
1144
1145               See also "remquo".
1146
1147       "remove"
1148               This is identical to Perl's builtin "unlink()" function for
1149               removing files, see "unlink" in perlfunc.
1150
1151       "remquo"
1152               Like "remainder" but also returns the low-order bits of the
1153               quotient (n) [C99]
1154
1155               (This is quite esoteric interface, mainly used to implement
1156               numerical algorithms.)
1157
1158       "rename"
1159               This is identical to Perl's builtin "rename()" function for
1160               renaming files, see "rename" in perlfunc.
1161
1162       "rewind"
1163               Seeks to the beginning of the file.
1164
1165       "rewinddir"
1166               This is identical to Perl's builtin "rewinddir()" function for
1167               rewinding directory entry streams, see "rewinddir" in perlfunc.
1168
1169       "rint"  Identical to "lrint".
1170
1171       "rmdir" This is identical to Perl's builtin "rmdir()" function for
1172               removing (empty) directories, see "rmdir" in perlfunc.
1173
1174       "round" Returns the integer (but still as floating point) nearest to
1175               the argument [C99].
1176
1177               See also "ceil", "floor", "lround", "modf", and "trunc".
1178
1179       "scalbn"
1180               Returns "x * 2**y" [C99].
1181
1182               See also "frexp" and "ldexp".
1183
1184       "scanf" Not implemented.  "scanf()" is C-specific, use <> and regular
1185               expressions instead, see perlre.
1186
1187       "setgid"
1188               Sets the real group identifier and the effective group
1189               identifier for this process.  Similar to assigning a value to
1190               the Perl's builtin $) variable, see "$EGID" in perlvar, except
1191               that the latter will change only the real user identifier, and
1192               that the setgid() uses only a single numeric argument, as
1193               opposed to a space-separated list of numbers.
1194
1195       "setjmp"
1196               Not implemented.  "setjmp()" is C-specific: use "eval {}"
1197               instead, see "eval" in perlfunc.
1198
1199       "setlocale"
1200               WARNING!  Do NOT use this function in a thread.  The locale
1201               will change in all other threads at the same time, and should
1202               your thread get paused by the operating system, and another
1203               started, that thread will not have the locale it is expecting.
1204               On some platforms, there can be a race leading to segfaults if
1205               two threads call this function nearly simultaneously.
1206
1207               Modifies and queries the program's underlying locale.  Users of
1208               this function should read perllocale, whch provides a
1209               comprehensive discussion of Perl locale handling, knowledge of
1210               which is necessary to properly use this function.  It contains
1211               a section devoted to this function.  The discussion here is
1212               merely a summary reference for "setlocale()".  Note that Perl
1213               itself is almost entirely unaffected by the locale except
1214               within the scope of "use locale".  (Exceptions are listed in
1215               "Not within the scope of "use locale"" in perllocale.)
1216
1217               The following examples assume
1218
1219                       use POSIX qw(setlocale LC_ALL LC_CTYPE);
1220
1221               has been issued.
1222
1223               The following will set the traditional UNIX system locale
1224               behavior (the second argument "C").
1225
1226                       $loc = setlocale( LC_ALL, "C" );
1227
1228               The following will query the current "LC_CTYPE" category.  (No
1229               second argument means 'query'.)
1230
1231                       $loc = setlocale( LC_CTYPE );
1232
1233               The following will set the "LC_CTYPE" behaviour according to
1234               the locale environment variables (the second argument "").
1235               Please see your system's setlocale(3) documentation for the
1236               locale environment variables' meaning or consult perllocale.
1237
1238                       $loc = setlocale( LC_CTYPE, "" );
1239
1240               The following will set the "LC_COLLATE" behaviour to
1241               Argentinian Spanish. NOTE: The naming and availability of
1242               locales depends on your operating system. Please consult
1243               perllocale for how to find out which locales are available in
1244               your system.
1245
1246                       $loc = setlocale( LC_COLLATE, "es_AR.ISO8859-1" );
1247
1248       "setpayload"
1249                       use POSIX ':nan_payload';
1250                       setpayload($var, $payload);
1251
1252               Sets the "NaN" payload of var.
1253
1254               NOTE: the NaN payload APIs are based on the latest (as of June
1255               2015) proposed ISO C interfaces, but they are not yet a
1256               standard.  Things may change.
1257
1258               See "nan" for more discussion about "NaN".
1259
1260               See also "setpayloadsig", "isnan", "getpayload", and
1261               "issignaling".
1262
1263       "setpayloadsig"
1264                       use POSIX ':nan_payload';
1265                       setpayloadsig($var, $payload);
1266
1267               Like "setpayload" but also makes the NaN signaling.
1268
1269               Depending on the platform the NaN may or may not behave
1270               differently.
1271
1272               Note the API instability warning in "setpayload".
1273
1274               Note that because how the floating point formats work out, on
1275               the most common platforms signaling payload of zero is best
1276               avoided, since it might end up being identical to "+Inf".
1277
1278               See also "nan", "isnan", "getpayload", and "issignaling".
1279
1280       "setpgid"
1281               This is similar to the C function "setpgid()" for setting the
1282               process group identifier of the current process.
1283
1284               Returns "undef" on failure.
1285
1286       "setsid"
1287               This is identical to the C function "setsid()" for setting the
1288               session identifier of the current process.
1289
1290       "setuid"
1291               Sets the real user identifier and the effective user identifier
1292               for this process.  Similar to assigning a value to the Perl's
1293               builtin $< variable, see "$UID" in perlvar, except that the
1294               latter will change only the real user identifier.
1295
1296       "sigaction"
1297               Detailed signal management.  This uses "POSIX::SigAction"
1298               objects for the "action" and "oldaction" arguments (the
1299               oldaction can also be just a hash reference).  Consult your
1300               system's "sigaction" manpage for details, see also
1301               "POSIX::SigRt".
1302
1303               Synopsis:
1304
1305                       sigaction(signal, action, oldaction = 0)
1306
1307               Returns "undef" on failure.  The "signal" must be a number
1308               (like "SIGHUP"), not a string (like "SIGHUP"), though Perl does
1309               try hard to understand you.
1310
1311               If you use the "SA_SIGINFO" flag, the signal handler will in
1312               addition to the first argument, the signal name, also receive a
1313               second argument, a hash reference, inside which are the
1314               following keys with the following semantics, as defined by
1315               POSIX/SUSv3:
1316
1317                   signo       the signal number
1318                   errno       the error number
1319                   code        if this is zero or less, the signal was sent by
1320                               a user process and the uid and pid make sense,
1321                               otherwise the signal was sent by the kernel
1322
1323               The constants for specific "code" values can be imported
1324               individually or using the ":signal_h_si_code" tag.
1325
1326               The following are also defined by POSIX/SUSv3, but
1327               unfortunately not very widely implemented:
1328
1329                   pid         the process id generating the signal
1330                   uid         the uid of the process id generating the signal
1331                   status      exit value or signal for SIGCHLD
1332                   band        band event for SIGPOLL
1333                   addr        address of faulting instruction or memory
1334                               reference for SIGILL, SIGFPE, SIGSEGV or SIGBUS
1335
1336               A third argument is also passed to the handler, which contains
1337               a copy of the raw binary contents of the "siginfo" structure:
1338               if a system has some non-POSIX fields, this third argument is
1339               where to "unpack()" them from.
1340
1341               Note that not all "siginfo" values make sense simultaneously
1342               (some are valid only for certain signals, for example), and not
1343               all values make sense from Perl perspective, you should to
1344               consult your system's "sigaction" and possibly also "siginfo"
1345               documentation.
1346
1347       "siglongjmp"
1348               Not implemented.  "siglongjmp()" is C-specific: use "die" in
1349               perlfunc instead.
1350
1351       "signbit"
1352               Returns zero for positive arguments, non-zero for negative
1353               arguments [C99].
1354
1355       "sigpending"
1356               Examine signals that are blocked and pending.  This uses
1357               "POSIX::SigSet" objects for the "sigset" argument.  Consult
1358               your system's "sigpending" manpage for details.
1359
1360               Synopsis:
1361
1362                       sigpending(sigset)
1363
1364               Returns "undef" on failure.
1365
1366       "sigprocmask"
1367               Change and/or examine calling process's signal mask.  This uses
1368               "POSIX::SigSet" objects for the "sigset" and "oldsigset"
1369               arguments.  Consult your system's "sigprocmask" manpage for
1370               details.
1371
1372               Synopsis:
1373
1374                       sigprocmask(how, sigset, oldsigset = 0)
1375
1376               Returns "undef" on failure.
1377
1378               Note that you can't reliably block or unblock a signal from its
1379               own signal handler if you're using safe signals. Other signals
1380               can be blocked or unblocked reliably.
1381
1382       "sigsetjmp"
1383               Not implemented.  "sigsetjmp()" is C-specific: use "eval {}"
1384               instead, see "eval" in perlfunc.
1385
1386       "sigsuspend"
1387               Install a signal mask and suspend process until signal arrives.
1388               This uses "POSIX::SigSet" objects for the "signal_mask"
1389               argument.  Consult your system's "sigsuspend" manpage for
1390               details.
1391
1392               Synopsis:
1393
1394                       sigsuspend(signal_mask)
1395
1396               Returns "undef" on failure.
1397
1398       "sin"   This is identical to Perl's builtin "sin()" function for
1399               returning the sine of the numerical argument, see "sin" in
1400               perlfunc.  See also Math::Trig.
1401
1402       "sinh"  This is identical to the C function "sinh()" for returning the
1403               hyperbolic sine of the numerical argument.  See also
1404               Math::Trig.
1405
1406       "sleep" This is functionally identical to Perl's builtin "sleep()"
1407               function for suspending the execution of the current for
1408               process for certain number of seconds, see "sleep" in perlfunc.
1409               There is one significant difference, however: "POSIX::sleep()"
1410               returns the number of unslept seconds, while the
1411               "CORE::sleep()" returns the number of slept seconds.
1412
1413       "sprintf"
1414               This is similar to Perl's builtin "sprintf()" function for
1415               returning a string that has the arguments formatted as
1416               requested, see "sprintf" in perlfunc.
1417
1418       "sqrt"  This is identical to Perl's builtin "sqrt()" function.  for
1419               returning the square root of the numerical argument, see "sqrt"
1420               in perlfunc.
1421
1422       "srand" Give a seed the pseudorandom number generator, see "srand" in
1423               perlfunc.
1424
1425       "sscanf"
1426               Not implemented.  "sscanf()" is C-specific, use regular
1427               expressions instead, see perlre.
1428
1429       "stat"  This is identical to Perl's builtin "stat()" function for
1430               returning information about files and directories.
1431
1432       "strcat"
1433               Not implemented.  "strcat()" is C-specific, use ".=" instead,
1434               see perlop.
1435
1436       "strchr"
1437               Not implemented.  "strchr()" is C-specific, see "index" in
1438               perlfunc instead.
1439
1440       "strcmp"
1441               Not implemented.  "strcmp()" is C-specific, use "eq" or "cmp"
1442               instead, see perlop.
1443
1444       "strcoll"
1445               This is identical to the C function "strcoll()" for collating
1446               (comparing) strings transformed using the "strxfrm()" function.
1447               Not really needed since Perl can do this transparently, see
1448               perllocale.
1449
1450               Beware that in a UTF-8 locale, anything you pass to this
1451               function must be in UTF-8; and when not in a UTF-8 locale,
1452               anything passed must not be UTF-8 encoded.
1453
1454       "strcpy"
1455               Not implemented.  "strcpy()" is C-specific, use "=" instead,
1456               see perlop.
1457
1458       "strcspn"
1459               Not implemented.  "strcspn()" is C-specific, use regular
1460               expressions instead, see perlre.
1461
1462       "strerror"
1463               Returns the error string for the specified errno.  Identical to
1464               the string form of $!, see "$ERRNO" in perlvar.
1465
1466       "strftime"
1467               Convert date and time information to string.  Returns the
1468               string.
1469
1470               Synopsis:
1471
1472                       strftime(fmt, sec, min, hour, mday, mon, year,
1473                                wday = -1, yday = -1, isdst = -1)
1474
1475               The month ("mon"), weekday ("wday"), and yearday ("yday") begin
1476               at zero, i.e., January is 0, not 1; Sunday is 0, not 1; January
1477               1st is 0, not 1.  The year ("year") is given in years since
1478               1900, i.e., the year 1995 is 95; the year 2001 is 101.  Consult
1479               your system's "strftime()" manpage for details about these and
1480               the other arguments.
1481
1482               If you want your code to be portable, your format ("fmt")
1483               argument should use only the conversion specifiers defined by
1484               the ANSI C standard (C89, to play safe).  These are
1485               "aAbBcdHIjmMpSUwWxXyYZ%".  But even then, the results of some
1486               of the conversion specifiers are non-portable.  For example,
1487               the specifiers "aAbBcpZ" change according to the locale
1488               settings of the user, and both how to set locales (the locale
1489               names) and what output to expect are non-standard.  The
1490               specifier "c" changes according to the timezone settings of the
1491               user and the timezone computation rules of the operating
1492               system.  The "Z" specifier is notoriously unportable since the
1493               names of timezones are non-standard. Sticking to the numeric
1494               specifiers is the safest route.
1495
1496               The given arguments are made consistent as though by calling
1497               "mktime()" before calling your system's "strftime()" function,
1498               except that the "isdst" value is not affected.
1499
1500               The string for Tuesday, December 12, 1995.
1501
1502                       $str = POSIX::strftime( "%A, %B %d, %Y",
1503                                                0, 0, 0, 12, 11, 95, 2 );
1504                       print "$str\n";
1505
1506       "strlen"
1507               Not implemented.  "strlen()" is C-specific, use "length()"
1508               instead, see "length" in perlfunc.
1509
1510       "strncat"
1511               Not implemented.  "strncat()" is C-specific, use ".=" instead,
1512               see perlop.
1513
1514       "strncmp"
1515               Not implemented.  "strncmp()" is C-specific, use "eq" instead,
1516               see perlop.
1517
1518       "strncpy"
1519               Not implemented.  "strncpy()" is C-specific, use "=" instead,
1520               see perlop.
1521
1522       "strpbrk"
1523               Not implemented.  "strpbrk()" is C-specific, use regular
1524               expressions instead, see perlre.
1525
1526       "strrchr"
1527               Not implemented.  "strrchr()" is C-specific, see "rindex" in
1528               perlfunc instead.
1529
1530       "strspn"
1531               Not implemented.  "strspn()" is C-specific, use regular
1532               expressions instead, see perlre.
1533
1534       "strstr"
1535               This is identical to Perl's builtin "index()" function, see
1536               "index" in perlfunc.
1537
1538       "strtod"
1539               String to double translation. Returns the parsed number and the
1540               number of characters in the unparsed portion of the string.
1541               Truly POSIX-compliant systems set $! ($ERRNO) to indicate a
1542               translation error, so clear $! before calling "strtod".
1543               However, non-POSIX systems may not check for overflow, and
1544               therefore will never set $!.
1545
1546               "strtod" respects any POSIX "setlocale()" "LC_TIME" settings,
1547               regardless of whether or not it is called from Perl code that
1548               is within the scope of "use locale".
1549
1550               To parse a string $str as a floating point number use
1551
1552                   $! = 0;
1553                   ($num, $n_unparsed) = POSIX::strtod($str);
1554
1555               The second returned item and $! can be used to check for valid
1556               input:
1557
1558                   if (($str eq '') || ($n_unparsed != 0) || $!) {
1559                       die "Non-numeric input $str" . ($! ? ": $!\n" : "\n");
1560                   }
1561
1562               When called in a scalar context "strtod" returns the parsed
1563               number.
1564
1565       "strtok"
1566               Not implemented.  "strtok()" is C-specific, use regular
1567               expressions instead, see perlre, or "split" in perlfunc.
1568
1569       "strtol"
1570               String to (long) integer translation.  Returns the parsed
1571               number and the number of characters in the unparsed portion of
1572               the string.  Truly POSIX-compliant systems set $! ($ERRNO) to
1573               indicate a translation error, so clear $! before calling
1574               "strtol".  However, non-POSIX systems may not check for
1575               overflow, and therefore will never set $!.
1576
1577               "strtol" should respect any POSIX setlocale() settings.
1578
1579               To parse a string $str as a number in some base $base use
1580
1581                   $! = 0;
1582                   ($num, $n_unparsed) = POSIX::strtol($str, $base);
1583
1584               The base should be zero or between 2 and 36, inclusive.  When
1585               the base is zero or omitted "strtol" will use the string itself
1586               to determine the base: a leading "0x" or "0X" means
1587               hexadecimal; a leading "0" means octal; any other leading
1588               characters mean decimal.  Thus, "1234" is parsed as a decimal
1589               number, "01234" as an octal number, and "0x1234" as a
1590               hexadecimal number.
1591
1592               The second returned item and $! can be used to check for valid
1593               input:
1594
1595                   if (($str eq '') || ($n_unparsed != 0) || !$!) {
1596                       die "Non-numeric input $str" . $! ? ": $!\n" : "\n";
1597                   }
1598
1599               When called in a scalar context "strtol" returns the parsed
1600               number.
1601
1602       "strtold"
1603               Like "strtod" but for long doubles.  Defined only if the system
1604               supports long doubles.
1605
1606       "strtoul"
1607               String to unsigned (long) integer translation.  "strtoul()" is
1608               identical to "strtol()" except that "strtoul()" only parses
1609               unsigned integers.  See "strtol" for details.
1610
1611               Note: Some vendors supply "strtod()" and "strtol()" but not
1612               "strtoul()".  Other vendors that do supply "strtoul()" parse
1613               "-1" as a valid value.
1614
1615       "strxfrm"
1616               String transformation.  Returns the transformed string.
1617
1618                       $dst = POSIX::strxfrm( $src );
1619
1620               Used in conjunction with the "strcoll()" function, see
1621               "strcoll".
1622
1623               Not really needed since Perl can do this transparently, see
1624               perllocale.
1625
1626               Beware that in a UTF-8 locale, anything you pass to this
1627               function must be in UTF-8; and when not in a UTF-8 locale,
1628               anything passed must not be UTF-8 encoded.
1629
1630       "sysconf"
1631               Retrieves values of system configurable variables.
1632
1633               The following will get the machine's clock speed.
1634
1635                       $clock_ticks = POSIX::sysconf( &POSIX::_SC_CLK_TCK );
1636
1637               Returns "undef" on failure.
1638
1639       "system"
1640               This is identical to Perl's builtin "system()" function, see
1641               "system" in perlfunc.
1642
1643       "tan"   This is identical to the C function "tan()", returning the
1644               tangent of the numerical argument.  See also Math::Trig.
1645
1646       "tanh"  This is identical to the C function "tanh()", returning the
1647               hyperbolic tangent of the numerical argument.   See also
1648               Math::Trig.
1649
1650       "tcdrain"
1651               This is similar to the C function "tcdrain()" for draining the
1652               output queue of its argument stream.
1653
1654               Returns "undef" on failure.
1655
1656       "tcflow"
1657               This is similar to the C function "tcflow()" for controlling
1658               the flow of its argument stream.
1659
1660               Returns "undef" on failure.
1661
1662       "tcflush"
1663               This is similar to the C function "tcflush()" for flushing the
1664               I/O buffers of its argument stream.
1665
1666               Returns "undef" on failure.
1667
1668       "tcgetpgrp"
1669               This is identical to the C function "tcgetpgrp()" for returning
1670               the process group identifier of the foreground process group of
1671               the controlling terminal.
1672
1673       "tcsendbreak"
1674               This is similar to the C function "tcsendbreak()" for sending a
1675               break on its argument stream.
1676
1677               Returns "undef" on failure.
1678
1679       "tcsetpgrp"
1680               This is similar to the C function "tcsetpgrp()" for setting the
1681               process group identifier of the foreground process group of the
1682               controlling terminal.
1683
1684               Returns "undef" on failure.
1685
1686       "tgamma"
1687               The Gamma function [C99].
1688
1689               See also "lgamma".
1690
1691       "time"  This is identical to Perl's builtin "time()" function for
1692               returning the number of seconds since the epoch (whatever it is
1693               for the system), see "time" in perlfunc.
1694
1695       "times" The "times()" function returns elapsed realtime since some
1696               point in the past (such as system startup), user and system
1697               times for this process, and user and system times used by child
1698               processes.  All times are returned in clock ticks.
1699
1700                   ($realtime, $user, $system, $cuser, $csystem)
1701                       = POSIX::times();
1702
1703               Note: Perl's builtin "times()" function returns four values,
1704               measured in seconds.
1705
1706       "tmpfile"
1707               Not implemented.  Use method "IO::File::new_tmpfile()" instead,
1708               or see File::Temp.
1709
1710       "tmpnam"
1711               For security reasons, which are probably detailed in your
1712               system's documentation for the C library "tmpnam()" function,
1713               this interface is no longer available; instead use File::Temp.
1714
1715       "tolower"
1716               This is identical to the C function, except that it can apply
1717               to a single character or to a whole string, and currently
1718               operates as if the locale always is "C".  Consider using the
1719               "lc()" function, see "lc" in perlfunc, see "lc" in perlfunc, or
1720               the equivalent "\L" operator inside doublequotish strings.
1721
1722       "toupper"
1723               This is similar to the C function, except that it can apply to
1724               a single character or to a whole string, and currently operates
1725               as if the locale always is "C".  Consider using the "uc()"
1726               function, see "uc" in perlfunc, or the equivalent "\U" operator
1727               inside doublequotish strings.
1728
1729       "trunc" Returns the integer toward zero from the argument [C99].
1730
1731               See also "ceil", "floor", and "round".
1732
1733       "ttyname"
1734               This is identical to the C function "ttyname()" for returning
1735               the name of the current terminal.
1736
1737       "tzname"
1738               Retrieves the time conversion information from the "tzname"
1739               variable.
1740
1741                       POSIX::tzset();
1742                       ($std, $dst) = POSIX::tzname();
1743
1744       "tzset" This is identical to the C function "tzset()" for setting the
1745               current timezone based on the environment variable "TZ", to be
1746               used by "ctime()", "localtime()", "mktime()", and "strftime()"
1747               functions.
1748
1749       "umask" This is identical to Perl's builtin "umask()" function for
1750               setting (and querying) the file creation permission mask, see
1751               "umask" in perlfunc.
1752
1753       "uname" Get name of current operating system.
1754
1755                       ($sysname, $nodename, $release, $version, $machine)
1756                               = POSIX::uname();
1757
1758               Note that the actual meanings of the various fields are not
1759               that well standardized, do not expect any great portability.
1760               The $sysname might be the name of the operating system, the
1761               $nodename might be the name of the host, the $release might be
1762               the (major) release number of the operating system, the
1763               $version might be the (minor) release number of the operating
1764               system, and the $machine might be a hardware identifier.
1765               Maybe.
1766
1767       "ungetc"
1768               Not implemented.  Use method "IO::Handle::ungetc()" instead.
1769
1770       "unlink"
1771               This is identical to Perl's builtin "unlink()" function for
1772               removing files, see "unlink" in perlfunc.
1773
1774       "utime" This is identical to Perl's builtin "utime()" function for
1775               changing the time stamps of files and directories, see "utime"
1776               in perlfunc.
1777
1778       "vfprintf"
1779               Not implemented.  "vfprintf()" is C-specific, see "printf" in
1780               perlfunc instead.
1781
1782       "vprintf"
1783               Not implemented.  "vprintf()" is C-specific, see "printf" in
1784               perlfunc instead.
1785
1786       "vsprintf"
1787               Not implemented.  "vsprintf()" is C-specific, see "sprintf" in
1788               perlfunc instead.
1789
1790       "wait"  This is identical to Perl's builtin "wait()" function, see
1791               "wait" in perlfunc.
1792
1793       "waitpid"
1794               Wait for a child process to change state.  This is identical to
1795               Perl's builtin "waitpid()" function, see "waitpid" in perlfunc.
1796
1797                       $pid = POSIX::waitpid( -1, POSIX::WNOHANG );
1798                       print "status = ", ($? / 256), "\n";
1799
1800       "wcstombs"
1801               This is identical to the C function "wcstombs()".
1802
1803               See "mblen".
1804
1805       "wctomb"
1806               This is identical to the C function "wctomb()".
1807
1808               See "mblen".
1809
1810       "write" Write to a file.  This uses file descriptors such as those
1811               obtained by calling "POSIX::open".
1812
1813                       $fd = POSIX::open( "foo", &POSIX::O_WRONLY );
1814                       $buf = "hello";
1815                       $bytes = POSIX::write( $fd, $buf, 5 );
1816
1817               Returns "undef" on failure.
1818
1819               See also "syswrite" in perlfunc.
1820

CLASSES

1822   "POSIX::SigAction"
1823       "new"   Creates a new "POSIX::SigAction" object which corresponds to
1824               the C "struct sigaction".  This object will be destroyed
1825               automatically when it is no longer needed.  The first parameter
1826               is the handler, a sub reference.  The second parameter is a
1827               "POSIX::SigSet" object, it defaults to the empty set.  The
1828               third parameter contains the "sa_flags", it defaults to 0.
1829
1830                       $sigset = POSIX::SigSet->new(SIGINT, SIGQUIT);
1831                       $sigaction = POSIX::SigAction->new(
1832                                       \&handler, $sigset, &POSIX::SA_NOCLDSTOP
1833                                    );
1834
1835               This "POSIX::SigAction" object is intended for use with the
1836               "POSIX::sigaction()" function.
1837
1838       "handler"
1839       "mask"
1840       "flags" accessor functions to get/set the values of a SigAction object.
1841
1842                       $sigset = $sigaction->mask;
1843                       $sigaction->flags(&POSIX::SA_RESTART);
1844
1845       "safe"  accessor function for the "safe signals" flag of a SigAction
1846               object; see perlipc for general information on safe (a.k.a.
1847               "deferred") signals.  If you wish to handle a signal safely,
1848               use this accessor to set the "safe" flag in the
1849               "POSIX::SigAction" object:
1850
1851                       $sigaction->safe(1);
1852
1853               You may also examine the "safe" flag on the output action
1854               object which is filled in when given as the third parameter to
1855               "POSIX::sigaction()":
1856
1857                       sigaction(SIGINT, $new_action, $old_action);
1858                       if ($old_action->safe) {
1859                           # previous SIGINT handler used safe signals
1860                       }
1861
1862   "POSIX::SigRt"
1863       %SIGRT  A hash of the POSIX realtime signal handlers.  It is an
1864               extension of the standard %SIG, the $POSIX::SIGRT{SIGRTMIN} is
1865               roughly equivalent to $SIG{SIGRTMIN}, but the right POSIX moves
1866               (see below) are made with the "POSIX::SigSet" and
1867               "POSIX::sigaction" instead of accessing the %SIG.
1868
1869               You can set the %POSIX::SIGRT elements to set the POSIX
1870               realtime signal handlers, use "delete" and "exists" on the
1871               elements, and use "scalar" on the %POSIX::SIGRT to find out how
1872               many POSIX realtime signals there are available
1873               "(SIGRTMAX - SIGRTMIN + 1", the "SIGRTMAX" is a valid POSIX
1874               realtime signal).
1875
1876               Setting the %SIGRT elements is equivalent to calling this:
1877
1878                 sub new {
1879                   my ($rtsig, $handler, $flags) = @_;
1880                   my $sigset = POSIX::SigSet($rtsig);
1881                   my $sigact = POSIX::SigAction->new($handler,$sigset,$flags);
1882                   sigaction($rtsig, $sigact);
1883                 }
1884
1885               The flags default to zero, if you want something different you
1886               can either use "local" on $POSIX::SigRt::SIGACTION_FLAGS, or
1887               you can derive from POSIX::SigRt and define your own "new()"
1888               (the tied hash STORE method of the %SIGRT calls "new($rtsig,
1889               $handler, $SIGACTION_FLAGS)", where the $rtsig ranges from zero
1890               to "SIGRTMAX - SIGRTMIN + 1)".
1891
1892               Just as with any signal, you can use "sigaction($rtsig, undef,
1893               $oa)" to retrieve the installed signal handler (or, rather, the
1894               signal action).
1895
1896               NOTE: whether POSIX realtime signals really work in your
1897               system, or whether Perl has been compiled so that it works with
1898               them, is outside of this discussion.
1899
1900       "SIGRTMIN"
1901               Return the minimum POSIX realtime signal number available, or
1902               "undef" if no POSIX realtime signals are available.
1903
1904       "SIGRTMAX"
1905               Return the maximum POSIX realtime signal number available, or
1906               "undef" if no POSIX realtime signals are available.
1907
1908   "POSIX::SigSet"
1909       "new"   Create a new SigSet object.  This object will be destroyed
1910               automatically when it is no longer needed.  Arguments may be
1911               supplied to initialize the set.
1912
1913               Create an empty set.
1914
1915                       $sigset = POSIX::SigSet->new;
1916
1917               Create a set with "SIGUSR1".
1918
1919                       $sigset = POSIX::SigSet->new( &POSIX::SIGUSR1 );
1920
1921       "addset"
1922               Add a signal to a SigSet object.
1923
1924                       $sigset->addset( &POSIX::SIGUSR2 );
1925
1926               Returns "undef" on failure.
1927
1928       "delset"
1929               Remove a signal from the SigSet object.
1930
1931                       $sigset->delset( &POSIX::SIGUSR2 );
1932
1933               Returns "undef" on failure.
1934
1935       "emptyset"
1936               Initialize the SigSet object to be empty.
1937
1938                       $sigset->emptyset();
1939
1940               Returns "undef" on failure.
1941
1942       "fillset"
1943               Initialize the SigSet object to include all signals.
1944
1945                       $sigset->fillset();
1946
1947               Returns "undef" on failure.
1948
1949       "ismember"
1950               Tests the SigSet object to see if it contains a specific
1951               signal.
1952
1953                       if( $sigset->ismember( &POSIX::SIGUSR1 ) ){
1954                               print "contains SIGUSR1\n";
1955                       }
1956
1957   "POSIX::Termios"
1958       "new"   Create a new Termios object.  This object will be destroyed
1959               automatically when it is no longer needed.  A Termios object
1960               corresponds to the "termios" C struct.  "new()" mallocs a new
1961               one, "getattr()" fills it from a file descriptor, and
1962               "setattr()" sets a file descriptor's parameters to match
1963               Termios' contents.
1964
1965                       $termios = POSIX::Termios->new;
1966
1967       "getattr"
1968               Get terminal control attributes.
1969
1970               Obtain the attributes for "stdin".
1971
1972                       $termios->getattr( 0 ) # Recommended for clarity.
1973                       $termios->getattr()
1974
1975               Obtain the attributes for stdout.
1976
1977                       $termios->getattr( 1 )
1978
1979               Returns "undef" on failure.
1980
1981       "getcc" Retrieve a value from the "c_cc" field of a "termios" object.
1982               The "c_cc" field is an array so an index must be specified.
1983
1984                       $c_cc[1] = $termios->getcc(1);
1985
1986       "getcflag"
1987               Retrieve the "c_cflag" field of a "termios" object.
1988
1989                       $c_cflag = $termios->getcflag;
1990
1991       "getiflag"
1992               Retrieve the "c_iflag" field of a "termios" object.
1993
1994                       $c_iflag = $termios->getiflag;
1995
1996       "getispeed"
1997               Retrieve the input baud rate.
1998
1999                       $ispeed = $termios->getispeed;
2000
2001       "getlflag"
2002               Retrieve the "c_lflag" field of a "termios" object.
2003
2004                       $c_lflag = $termios->getlflag;
2005
2006       "getoflag"
2007               Retrieve the "c_oflag" field of a "termios" object.
2008
2009                       $c_oflag = $termios->getoflag;
2010
2011       "getospeed"
2012               Retrieve the output baud rate.
2013
2014                       $ospeed = $termios->getospeed;
2015
2016       "setattr"
2017               Set terminal control attributes.
2018
2019               Set attributes immediately for stdout.
2020
2021                       $termios->setattr( 1, &POSIX::TCSANOW );
2022
2023               Returns "undef" on failure.
2024
2025       "setcc" Set a value in the "c_cc" field of a "termios" object.  The
2026               "c_cc" field is an array so an index must be specified.
2027
2028                       $termios->setcc( &POSIX::VEOF, 1 );
2029
2030       "setcflag"
2031               Set the "c_cflag" field of a "termios" object.
2032
2033                       $termios->setcflag( $c_cflag | &POSIX::CLOCAL );
2034
2035       "setiflag"
2036               Set the "c_iflag" field of a "termios" object.
2037
2038                       $termios->setiflag( $c_iflag | &POSIX::BRKINT );
2039
2040       "setispeed"
2041               Set the input baud rate.
2042
2043                       $termios->setispeed( &POSIX::B9600 );
2044
2045               Returns "undef" on failure.
2046
2047       "setlflag"
2048               Set the "c_lflag" field of a "termios" object.
2049
2050                       $termios->setlflag( $c_lflag | &POSIX::ECHO );
2051
2052       "setoflag"
2053               Set the "c_oflag" field of a "termios" object.
2054
2055                       $termios->setoflag( $c_oflag | &POSIX::OPOST );
2056
2057       "setospeed"
2058               Set the output baud rate.
2059
2060                       $termios->setospeed( &POSIX::B9600 );
2061
2062               Returns "undef" on failure.
2063
2064       Baud rate values
2065               "B38400" "B75" "B200" "B134" "B300" "B1800" "B150" "B0"
2066               "B19200" "B1200" "B9600" "B600" "B4800" "B50" "B2400" "B110"
2067
2068       Terminal interface values
2069               "TCSADRAIN" "TCSANOW" "TCOON" "TCIOFLUSH" "TCOFLUSH" "TCION"
2070               "TCIFLUSH" "TCSAFLUSH" "TCIOFF" "TCOOFF"
2071
2072       "c_cc" field values
2073               "VEOF" "VEOL" "VERASE" "VINTR" "VKILL" "VQUIT" "VSUSP" "VSTART"
2074               "VSTOP" "VMIN" "VTIME" "NCCS"
2075
2076       "c_cflag" field values
2077               "CLOCAL" "CREAD" "CSIZE" "CS5" "CS6" "CS7" "CS8" "CSTOPB"
2078               "HUPCL" "PARENB" "PARODD"
2079
2080       "c_iflag" field values
2081               "BRKINT" "ICRNL" "IGNBRK" "IGNCR" "IGNPAR" "INLCR" "INPCK"
2082               "ISTRIP" "IXOFF" "IXON" "PARMRK"
2083
2084       "c_lflag" field values
2085               "ECHO" "ECHOE" "ECHOK" "ECHONL" "ICANON" "IEXTEN" "ISIG"
2086               "NOFLSH" "TOSTOP"
2087
2088       "c_oflag" field values
2089               "OPOST"
2090

PATHNAME CONSTANTS

2092       Constants
2093               "_PC_CHOWN_RESTRICTED" "_PC_LINK_MAX" "_PC_MAX_CANON"
2094               "_PC_MAX_INPUT" "_PC_NAME_MAX" "_PC_NO_TRUNC" "_PC_PATH_MAX"
2095               "_PC_PIPE_BUF" "_PC_VDISABLE"
2096

POSIX CONSTANTS

2098       Constants
2099               "_POSIX_ARG_MAX" "_POSIX_CHILD_MAX" "_POSIX_CHOWN_RESTRICTED"
2100               "_POSIX_JOB_CONTROL" "_POSIX_LINK_MAX" "_POSIX_MAX_CANON"
2101               "_POSIX_MAX_INPUT" "_POSIX_NAME_MAX" "_POSIX_NGROUPS_MAX"
2102               "_POSIX_NO_TRUNC" "_POSIX_OPEN_MAX" "_POSIX_PATH_MAX"
2103               "_POSIX_PIPE_BUF" "_POSIX_SAVED_IDS" "_POSIX_SSIZE_MAX"
2104               "_POSIX_STREAM_MAX" "_POSIX_TZNAME_MAX" "_POSIX_VDISABLE"
2105               "_POSIX_VERSION"
2106

SYSTEM CONFIGURATION

2108       Constants
2109               "_SC_ARG_MAX" "_SC_CHILD_MAX" "_SC_CLK_TCK" "_SC_JOB_CONTROL"
2110               "_SC_NGROUPS_MAX" "_SC_OPEN_MAX" "_SC_PAGESIZE" "_SC_SAVED_IDS"
2111               "_SC_STREAM_MAX" "_SC_TZNAME_MAX" "_SC_VERSION"
2112

ERRNO

2114       Constants
2115               "E2BIG" "EACCES" "EADDRINUSE" "EADDRNOTAVAIL" "EAFNOSUPPORT"
2116               "EAGAIN" "EALREADY" "EBADF" "EBADMSG" "EBUSY" "ECANCELED"
2117               "ECHILD" "ECONNABORTED" "ECONNREFUSED" "ECONNRESET" "EDEADLK"
2118               "EDESTADDRREQ" "EDOM" "EDQUOT" "EEXIST" "EFAULT" "EFBIG"
2119               "EHOSTDOWN" "EHOSTUNREACH" "EIDRM" "EILSEQ" "EINPROGRESS"
2120               "EINTR" "EINVAL" "EIO" "EISCONN" "EISDIR" "ELOOP" "EMFILE"
2121               "EMLINK" "EMSGSIZE" "ENAMETOOLONG" "ENETDOWN" "ENETRESET"
2122               "ENETUNREACH" "ENFILE" "ENOBUFS" "ENODATA" "ENODEV" "ENOENT"
2123               "ENOEXEC" "ENOLCK" "ENOLINK" "ENOMEM" "ENOMSG" "ENOPROTOOPT"
2124               "ENOSPC" "ENOSR" "ENOSTR" "ENOSYS" "ENOTBLK" "ENOTCONN"
2125               "ENOTDIR" "ENOTEMPTY" "ENOTRECOVERABLE" "ENOTSOCK" "ENOTSUP"
2126               "ENOTTY" "ENXIO" "EOPNOTSUPP" "EOTHER" "EOVERFLOW" "EOWNERDEAD"
2127               "EPERM" "EPFNOSUPPORT" "EPIPE" "EPROCLIM" "EPROTO"
2128               "EPROTONOSUPPORT" "EPROTOTYPE" "ERANGE" "EREMOTE" "ERESTART"
2129               "EROFS" "ESHUTDOWN" "ESOCKTNOSUPPORT" "ESPIPE" "ESRCH" "ESTALE"
2130               "ETIME" "ETIMEDOUT" "ETOOMANYREFS" "ETXTBSY" "EUSERS"
2131               "EWOULDBLOCK" "EXDEV"
2132

FCNTL

2134       Constants
2135               "FD_CLOEXEC" "F_DUPFD" "F_GETFD" "F_GETFL" "F_GETLK" "F_OK"
2136               "F_RDLCK" "F_SETFD" "F_SETFL" "F_SETLK" "F_SETLKW" "F_UNLCK"
2137               "F_WRLCK" "O_ACCMODE" "O_APPEND" "O_CREAT" "O_EXCL" "O_NOCTTY"
2138               "O_NONBLOCK" "O_RDONLY" "O_RDWR" "O_TRUNC" "O_WRONLY"
2139

FLOAT

2141       Constants
2142               "DBL_DIG" "DBL_EPSILON" "DBL_MANT_DIG" "DBL_MAX"
2143               "DBL_MAX_10_EXP" "DBL_MAX_EXP" "DBL_MIN" "DBL_MIN_10_EXP"
2144               "DBL_MIN_EXP" "FLT_DIG" "FLT_EPSILON" "FLT_MANT_DIG" "FLT_MAX"
2145               "FLT_MAX_10_EXP" "FLT_MAX_EXP" "FLT_MIN" "FLT_MIN_10_EXP"
2146               "FLT_MIN_EXP" "FLT_RADIX" "FLT_ROUNDS" "LDBL_DIG"
2147               "LDBL_EPSILON" "LDBL_MANT_DIG" "LDBL_MAX" "LDBL_MAX_10_EXP"
2148               "LDBL_MAX_EXP" "LDBL_MIN" "LDBL_MIN_10_EXP" "LDBL_MIN_EXP"
2149

FLOATING-POINT ENVIRONMENT

2151       Constants
2152               "FE_DOWNWARD" "FE_TONEAREST" "FE_TOWARDZERO" "FE_UPWARD" on
2153               systems that support them.
2154

LIMITS

2156       Constants
2157               "ARG_MAX" "CHAR_BIT" "CHAR_MAX" "CHAR_MIN" "CHILD_MAX"
2158               "INT_MAX" "INT_MIN" "LINK_MAX" "LONG_MAX" "LONG_MIN"
2159               "MAX_CANON" "MAX_INPUT" "MB_LEN_MAX" "NAME_MAX" "NGROUPS_MAX"
2160               "OPEN_MAX" "PATH_MAX" "PIPE_BUF" "SCHAR_MAX" "SCHAR_MIN"
2161               "SHRT_MAX" "SHRT_MIN" "SSIZE_MAX" "STREAM_MAX" "TZNAME_MAX"
2162               "UCHAR_MAX" "UINT_MAX" "ULONG_MAX" "USHRT_MAX"
2163

LOCALE

2165       Constants
2166               "LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MONETARY" "LC_NUMERIC"
2167               "LC_TIME" "LC_MESSAGES" on systems that support them.
2168

MATH

2170       Constants
2171               "HUGE_VAL"
2172
2173               "FP_ILOGB0" "FP_ILOGBNAN" "FP_INFINITE" "FP_NAN" "FP_NORMAL"
2174               "FP_SUBNORMAL" "FP_ZERO" "INFINITY" "NAN" "Inf" "NaN" "M_1_PI"
2175               "M_2_PI" "M_2_SQRTPI" "M_E" "M_LN10" "M_LN2" "M_LOG10E"
2176               "M_LOG2E" "M_PI" "M_PI_2" "M_PI_4" "M_SQRT1_2" "M_SQRT2" on
2177               systems with C99 support.
2178

SIGNAL

2180       Constants
2181               "SA_NOCLDSTOP" "SA_NOCLDWAIT" "SA_NODEFER" "SA_ONSTACK"
2182               "SA_RESETHAND" "SA_RESTART" "SA_SIGINFO" "SIGABRT" "SIGALRM"
2183               "SIGCHLD" "SIGCONT" "SIGFPE" "SIGHUP" "SIGILL" "SIGINT"
2184               "SIGKILL" "SIGPIPE" "SIGQUIT" "SIGSEGV" "SIGSTOP" "SIGTERM"
2185               "SIGTSTP" "SIGTTIN" "SIGTTOU" "SIGUSR1" "SIGUSR2" "SIG_BLOCK"
2186               "SIG_DFL" "SIG_ERR" "SIG_IGN" "SIG_SETMASK" "SIG_UNBLOCK"
2187               "ILL_ILLOPC" "ILL_ILLOPN" "ILL_ILLADR" "ILL_ILLTRP"
2188               "ILL_PRVOPC" "ILL_PRVREG" "ILL_COPROC" "ILL_BADSTK"
2189               "FPE_INTDIV" "FPE_INTOVF" "FPE_FLTDIV" "FPE_FLTOVF"
2190               "FPE_FLTUND" "FPE_FLTRES" "FPE_FLTINV" "FPE_FLTSUB"
2191               "SEGV_MAPERR" "SEGV_ACCERR" "BUS_ADRALN" "BUS_ADRERR"
2192               "BUS_OBJERR" "TRAP_BRKPT" "TRAP_TRACE" "CLD_EXITED"
2193               "CLD_KILLED" "CLD_DUMPED" "CLD_TRAPPED" "CLD_STOPPED"
2194               "CLD_CONTINUED" "POLL_IN" "POLL_OUT" "POLL_MSG" "POLL_ERR"
2195               "POLL_PRI" "POLL_HUP" "SI_USER" "SI_QUEUE" "SI_TIMER"
2196               "SI_ASYNCIO" "SI_MESGQ"
2197

STAT

2199       Constants
2200               "S_IRGRP" "S_IROTH" "S_IRUSR" "S_IRWXG" "S_IRWXO" "S_IRWXU"
2201               "S_ISGID" "S_ISUID" "S_IWGRP" "S_IWOTH" "S_IWUSR" "S_IXGRP"
2202               "S_IXOTH" "S_IXUSR"
2203
2204       Macros  "S_ISBLK" "S_ISCHR" "S_ISDIR" "S_ISFIFO" "S_ISREG"
2205

STDLIB

2207       Constants
2208               "EXIT_FAILURE" "EXIT_SUCCESS" "MB_CUR_MAX" "RAND_MAX"
2209

STDIO

2211       Constants
2212               "BUFSIZ" "EOF" "FILENAME_MAX" "L_ctermid" "L_cuserid" "TMP_MAX"
2213

TIME

2215       Constants
2216               "CLK_TCK" "CLOCKS_PER_SEC"
2217

UNISTD

2219       Constants
2220               "R_OK" "SEEK_CUR" "SEEK_END" "SEEK_SET" "STDIN_FILENO"
2221               "STDOUT_FILENO" "STDERR_FILENO" "W_OK" "X_OK"
2222

WAIT

2224       Constants
2225               "WNOHANG" "WUNTRACED"
2226
2227               "WNOHANG"       Do not suspend the calling process until a
2228                               child process changes state but instead return
2229                               immediately.
2230
2231               "WUNTRACED"     Catch stopped child processes.
2232
2233       Macros  "WIFEXITED" "WEXITSTATUS" "WIFSIGNALED" "WTERMSIG" "WIFSTOPPED"
2234               "WSTOPSIG"
2235
2236               "WIFEXITED"     "WIFEXITED(${^CHILD_ERROR_NATIVE})" returns
2237                               true if the child process exited normally
2238                               ("exit()" or by falling off the end of
2239                               "main()")
2240
2241               "WEXITSTATUS"   "WEXITSTATUS(${^CHILD_ERROR_NATIVE})" returns
2242                               the normal exit status of the child process
2243                               (only meaningful if
2244                               "WIFEXITED(${^CHILD_ERROR_NATIVE})" is true)
2245
2246               "WIFSIGNALED"   "WIFSIGNALED(${^CHILD_ERROR_NATIVE})" returns
2247                               true if the child process terminated because of
2248                               a signal
2249
2250               "WTERMSIG"      "WTERMSIG(${^CHILD_ERROR_NATIVE})" returns the
2251                               signal the child process terminated for (only
2252                               meaningful if
2253                               "WIFSIGNALED(${^CHILD_ERROR_NATIVE})" is true)
2254
2255               "WIFSTOPPED"    "WIFSTOPPED(${^CHILD_ERROR_NATIVE})" returns
2256                               true if the child process is currently stopped
2257                               (can happen only if you specified the WUNTRACED
2258                               flag to "waitpid()")
2259
2260               "WSTOPSIG"      "WSTOPSIG(${^CHILD_ERROR_NATIVE})" returns the
2261                               signal the child process was stopped for (only
2262                               meaningful if
2263                               "WIFSTOPPED(${^CHILD_ERROR_NATIVE})" is true)
2264

WINSOCK

2266       (Windows only.)
2267
2268       Constants
2269               "WSAEINTR" "WSAEBADF" "WSAEACCES" "WSAEFAULT" "WSAEINVAL"
2270               "WSAEMFILE" "WSAEWOULDBLOCK" "WSAEINPROGRESS" "WSAEALREADY"
2271               "WSAENOTSOCK" "WSAEDESTADDRREQ" "WSAEMSGSIZE" "WSAEPROTOTYPE"
2272               "WSAENOPROTOOPT" "WSAEPROTONOSUPPORT" "WSAESOCKTNOSUPPORT"
2273               "WSAEOPNOTSUPP" "WSAEPFNOSUPPORT" "WSAEAFNOSUPPORT"
2274               "WSAEADDRINUSE" "WSAEADDRNOTAVAIL" "WSAENETDOWN"
2275               "WSAENETUNREACH" "WSAENETRESET" "WSAECONNABORTED"
2276               "WSAECONNRESET" "WSAENOBUFS" "WSAEISCONN" "WSAENOTCONN"
2277               "WSAESHUTDOWN" "WSAETOOMANYREFS" "WSAETIMEDOUT"
2278               "WSAECONNREFUSED" "WSAELOOP" "WSAENAMETOOLONG" "WSAEHOSTDOWN"
2279               "WSAEHOSTUNREACH" "WSAENOTEMPTY" "WSAEPROCLIM" "WSAEUSERS"
2280               "WSAEDQUOT" "WSAESTALE" "WSAEREMOTE" "WSAEDISCON" "WSAENOMORE"
2281               "WSAECANCELLED" "WSAEINVALIDPROCTABLE" "WSAEINVALIDPROVIDER"
2282               "WSAEPROVIDERFAILEDINIT" "WSAEREFUSED"
2283
2284
2285
2286perl v5.26.3                      2018-03-23                        POSIX(3pm)
Impressum