=pod =head1 NAME POSIX::2008 - Perl interface to POSIX.1-2008 and beyond =head1 SYNOPSIS use POSIX::2008 qw(:fcntl openat pwrite); sysopen my $dh, '/tmp', O_RDONLY|O_DIRECTORY|O_NOFOLLOW or die 'Dafuq?'; my $fh = openat($dh, 'foobar', O_RDWR|O_CREAT); pwrite($fh, 'fuckyounsa', 10, 0); =head1 DESCRIPTION POSIX::2008 provides many of the interfaces specified by L I that the core L module withholds, implements in Perl or fucked up. It also ships a number of nonstandard interfaces and constants present in Linux, BSD and Solaris that are extensions of POSIX. This module is provided "as is" unless someone volunteers to maintain it. Use at your own risk. =head1 FILE DESCRIPTORS AND HANDLES Since version 0.05, all I/O functions that take numeric file descriptors also accept Perl file or directory handles, except for L|"fdopen"> and L|"fdopendir">. Since version 0.22, returned handles support L methods. =head1 SYSTEM CALL RETURN VALUES A system call return value of -1 meaning "error" is mapped to undef except for L|"poll"> and L|"ppoll"> which return -1 to be consistent with L|perlfunc/select>. A system call return value of 0 meaning "success" is mapped to "0 but true". For system calls where 0 does not just mean "success", 0 is returned unchanged. These are L|"creat">, L|"dup3">, L|"open">, L|"read">, L|"write">, L|"readv">, L|"writev">, L|"pread">, L|"pwrite">, L|"preadv">, L|"pwritev">, L|"preadv2">, L|"pwritev2">, L|"getpriority">, L|"nice">. L|"openat"> gets a special treatment in this regard, see below. =head1 FUNCTIONS =over 4 =item C l = a64l(s); =item C abort(); =item C ui = abs(i); Calls C, C, or C, whichever is the maximum supported by your system. Note that the library functions use signed integers, so C is 1. If you don't want that, use C. =item C conn = accept4(sock, flags); C is similar to L|perlfunc/accept> except for the following differences. I is a numeric file descriptor or a Perl file handle referring to a listening socket. I is the bitwise OR of zero or more of C, C, C. Your system might support a different set of flags. C returns a numeric file descriptor (which may be 0) or a Perl file handle for the accepted socket. The type of the return value is the same as that of the I argument. On error, undef is returned. C was standardized with POSIX.1-2024. I =item C rv = access(path, mode); I =item C y = acos(x); =item C y = acosh(x); =item C remaining_sec = alarm(sec); =item C y = asin(x); =item C y = asinh(x); =item C z = atan2(y, x); =item C y = atan(x); =item C y = atanh(x); =item C f = atof(s); =item C i = atoi(s); Calls C, C, or C, whichever is the maximum supported by your system. This is of course silly because you could just use C. I Deprecated I and I now covered by I. =item C s = basename(path); =item C r = cabs(re, im); =item C (re, im) = cacos(re, im); =item C (re, im) = cacosh(re, im); =item C phi = carg(re, im); =item C y = casin(x); =item C (re, im) = casinh(re, im); =item C (re, im) = catan(re, im); =item C (re, im) = catanh(re, im); =item C rv = catclose(catd); =item C s = catgets(catd, set_id, msg_id, dflt_string); =item C catd = catopen(name, flag); =item C y = cbrt(x); =item C (re, im) = ccos(re, im); =item C (re, im) = ccosh(re, im); =item C y = ceil(x); =item C (re, im) = cexp(re, im); I =item C rv = chdir(dir); C can be a path, a Perl file or directory handle, or a file descriptor. I Deprecated I now covered by I. =item C rv = chmod(what, mode); C can be a path, a Perl file or directory handle (see L), or a file descriptor. I Deprecated I now covered by I. =item C rv = chown(what, uid, gid); C can be a path, a Perl file or directory handle (see L), or a file descriptor. I Deprecated I now covered by I. =item C im = cimag(re, im); =item C t = clock() I =item C clock_id = clock_getcpuclockid(pid); I defaults to 0. Returns undef on error. =item C (sec, nsec) = clock_getres(clock_id); floating_sec = clock_getres(clock_id); I defaults to C. Returns empty list or undef on error. I Return floating seconds in scalar context. =item C (sec, nsec) = clock_gettime(clock_id); floating_sec = clock_gettime(clock_id); clock_id defaults to C. Returns empty list or undef on error. I Return floating seconds in scalar context. =item C (rem_sec, rem_nsec) = clock_nanosleep(clock_id, flags, floating_sec); floating_rem_sec = clock_nanosleep(clock_id, flags, floating_sec); (rem_sec, rem_nsec) = clock_nanosleep(clock_id, flags, sec, nsec); floating_rem_sec = clock_nanosleep(clock_id, flags, sec, nsec); Returns zero(es) on success, the remaining time on EINTR, the empty list or undef otherwise. The remaining time is zero if the flag C is set. I Sleep time can be floating seconds only or seconds and nanoseconds. =item C rv = clock_settime(clock_id, sec, nsec); rv = clock_settime(clock_id, floating_sec); I Time can be floating seconds only or seconds and nanoseconds. =item C (re, im) = clog(re, im); =item C rv = close(fd); =item C s = confstr(name); I is one of the C<_CS_*> integer constants. Returns undef on error. =item C (re, im) = conj(re, im); =item C xs = copysign(x, y); =item C y = cos(x); =item C y = cosh(x); =item C (re, im) = cpow(re_x, im_x, re_y, im_y); =item C (re, im) = cproj(re, im); =item C re = creal(re, im); =item C rv = creat(path, mode=0666); I =item C (re, im) = csin(re, im); =item C (re, im) = csinh(re, im); =item C (re, im) = csqrt(re, im); =item C (re, im) = ctan(re, im); =item C (re, im) = ctanh(re, im); =item C name = dirname(path); =item C
(quot, rem) = div(numer, denom); Calls C, C, or C, whichever is the maximum supported by your system. Note that the library functions use signed integers, so C is C<(-1, 0)>. If you don't want that, use Perls C, C and C<%>. I Deprecated I and I now covered by I
. =item C dlclose(dlhandle); =item C dlerror(); =item C dlhandle = dlopen(filename, flags); =item C addr = dlsym(dlhandle, name); =item C r = drand48(); =item C endutxent(); =item C newfd = dup3(oldfd, newfd, flags); C is similar to L|POSIX/dup2> except for the following differences. I and I may be numeric file descriptors or Perl file handles. If I equals I, then C fails with the error C. The I parameter forces the file descriptor flags of I to be the bitwise OR of zero or more of C, C. Your system might support a different set of flags. C returns the new numeric file descriptor (which may be 0). On error, undef is returned. C was standardized with POSIX.1-2024. I =item C (r, X0, X1, X2) = erand48(X0, X1, X2); =item C y = erf(x); =item C y = erfc(x); =item C rv = execveat(dirfd, path, args, env=undef, flags=0); The C system call is a nonstandard extension present in Linux. See also L|"fexecve">. It executes the program referred to by I, which is interpreted relative to I as with the other I<*at> functions, passing I as its command-line arguments and optionally I as its environment. I must be an array reference and, by convention, I[0]> should be the name of the program being executed. I must be a hash reference. If omitted or undef, the environment of the calling proces is used (which you can manipulate via C<%ENV>). I is a bit mask that can include zero or more of the flags C, C. I is executed "as is", i.e. no C search or interpretation of shell metacharacters takes place as opposed to Perl's built-in L|perlfunc/exec>. Returns undef on error, otherwise it doesn't return. Usage example: sysopen my $dh, '/usr', O_DIRECTORY|O_PATH; execveat($dh, 'bin/date', [qw(date +%T)], {TZ => 'UTC'}, AT_SYMLINK_NOFOLLOW); I =item C y = exp(x); =item C y = exp2(x); This function may not be available in libquadmath. =item C y = expm1(x); =item C absval = fabs(x); I =item C rv = faccessat(dirfd, path, amode, flags=0); I is the bitwise OR of zero or more of C, C. =item C rv = fchmodat(dirfd, path, mode, flags=0); I can be 0 or C. Your system might support a different set of flags. =item C rv = fchownat(dirfd, path, uid, gid, flags=0); I can be 0 or C. Your system might support a different set of flags. =item C rv = fdatasync(fd); =item C rv = fdopen(fd, mode); Returns a file handle associated with the numeric file descriptor I or undef on error. I is one of the values C<"r">, C<"w">, C<"a"> with an optional C<"+"> and/or C<"b">. The file descriptor is not dup'ed and will be closed when the handle is closed. It's similar to C with the following improvements: =over =item * It I calls C. =item * It expects POSIX mode strings (e.g. C<"r">, not C<"<">). =item * It fails if I is not compatible with the flags of I. =back Usage example: my $fh = do { opendir my $dh, '.'; fdopen(POSIX::dup(fileno $dh), 'r'); }; chmod 0700, $fh; # this would fail with $dh from opendir I I I can no longer be a handle (that was a wrong turn). =item C rv = fdopendir(fd); Returns a directory handle associated with the numeric file descriptor I or undef on error. The file descriptor is not dup'ed and will be closed when the handle is closed. Usage example: my $dh = do { sysopen my $fh, '/tmp', O_RDONLY|O_DIRECTORY|O_NOFOLLOW; fdopendir(POSIX::dup(fileno $fh)); }; my @dents = readdir $dh; # this would fail with $fh from sysopen I I I can no longer be a handle (that was a wrong turn). =item C d = fdim(double x, double y); =item C rv = feclearexcept(excepts); Returns C<0 but true> on success, undef on error. I =item C rounding_mode = fegetround(); =item C rv = feraiseexcept(excepts); Returns C<0 but true> on success, undef on error. I =item C rv = fesetround(round); Returns C<0 but true> on success, undef on error. =item C excepts_currently_set = fetestexcept(excepts); I =item C rv = fexecve(fd, args, env=undef); Executes the program referred to by the file descriptor I, passing I as its command-line arguments and optionally I as its environment. I must be an array reference and, by convention, I[0]> should be the name of the program being executed. I must be a hash reference. If omitted or undef, the environment of the calling proces is used (which you can manipulate via C<%ENV>). See the manpage for issues regarding the close-on-exec flag and the /proc filesystem. Returns undef on error, otherwise it doesn't return. Usage example: sysopen my $fh, '/usr/bin/date', O_PATH; fexecve($fh, [qw(date +%T)], {TZ => 'UTC'}); See also L|"execveat">. I =item C pos = ffs(i); Calls C, C, or C, whichever is the maximum available on your system. =item C y = floor(x); =item C r = fma(x, y, z); =item C m = fmax(x, y); =item C m = fmin(x, y); =item C m = fmod(x, y); =item C rv = fnmatch(pattern, string, flags); Returns 0 if I matches I, C if there is no match, undef if there is an error. I is the bitwise OR of zero or more of C, C, C, C, C, C. =item C rv = fpclassify(x); Returns one of C, C, C, C, C. =item C (fraction, exponent) = frexp(x); I =item C (dev, ino, mode, nlink, uid, gid, rdev, size, atim_sec, mtim_sec, ctim_sec, blksize, blocks, atim_nsec, mtim_nsec, ctim_nsec) = fstatat(dirfd, path, flags = 0); I is the bitwise OR of zero or more of C, C. Your system might support a different set of flags. See L|"stat"> for notes on the return values and bugs in C. In list context, it returns the above list on success or the empty list on error. In scalar context, it returns a (non-undef) boolean value indicating success or failure. =item C rv = fsync(fd); =item C rv = futimens(fd, atime_sec, atime_nsec, mtime_sec, mtime_nsec); I and I default to 0, I and I default to C. =item C (sec, min, hour, mday, mon, year, wday, yday, isdst) = getdate(string); =item C C returns the value of the getdate_err variable. =item C egid = getegid(); =item C s = getentropy(length); Returns a string of I bytes of "unpredictable high-quality random data, generated by a cryptographically secure pseudo-random number generator", or undef on error. The maximum permitted value for I is C (usually 256). If more bytes are requested, C<$!> is set to C as decreed by POSIX, even on systems that believe C is right. If your system does not provide C, it is emulated via C, C, C (Windows), C (Intel/AMD), C (ARM64), or C (Power9) if available (picked in this order at build time). C was standardized with POSIX.1-2024. I I Added DARN as a fallback on Power9. =item C euid = geteuid(); =item C gid = getgid(); =item C hostid = gethostid(); =item C hostname = gethostname(); =item C (int_sec, int_usec, val_sec, val_usec) = getitimer(which); I can be one of C, C, C. POSIX.1-2008 marks C and C obsolete, recommending the use of the POSIX timers API (L|"timer_gettime">, L|"timer_settime">, etc.) instead. POSIX.1-2024 removed C and C. =item C prio = getpriority(which=PRIO_PROCESS, who=0); I can be one of C, C, C, defaults to C. I defaults to 0. Returns undef on error. =item C (rgid, egid, sgid) = getresgid(); Returns the empty list on error. C was standardized with POSIX.1-2024. I =item C (ruid, euid, suid) = getresuid(); Returns the empty list on error. C was standardized with POSIX.1-2024. I =item C sid = getsid(pid); I defaults to 0. =item C uid = getuid(); =item C (user, id, line, pid, type, sec, usec) = getutxent(); C reads a line from the current file position in the utmp file. =item C (user, id, line, pid, type, sec, usec) = getutxid(ut_type[, ut_id]); C searches forward from the current file position in the utmp file based upon I and I. If I is one of C, C, C, or C, C will find the first entry whose I field matches I. If I is one of C, C, C, or C, C will find the first entry whose I field matches I. Returns the empty list on error. =item C (user, id, line, pid, type, sec, usec) = getutxline(ut_line); C searches forward from the current file position in the utmp file. It scans entries whose I is C or C and returns the first one whose I field matches I. Returns the empty list on error. =item C rv = grantpt(fd); I =item C r = hypot(x, y); =item C y = ilogb(x); =item C rv = isalnum(charstring); Like POSIX::isalnum() but returns 0 for the empty string. =item C rv = isalpha(charstring); Like POSIX::isalpha() but returns 0 for the empty string. =item C rv = isascii(charstring); POSIX.1-2008 marks it as obsolete and it was removed in POSIX.1-2024, but I include it anyway. I =item C rv = isatty(fd); =item C rv = isblank(charstring); Like POSIX::isblank() but returns 0 for the empty string. =item C rv = iscntrl(charstring); Like POSIX::iscntrl() but returns 0 for the empty string. =item C rv = isdigit(charstring); Like POSIX::isdigit() but returns 0 for the empty string. =item C rv = isfinite(x); =item C rv = isgraph(charstring); Like POSIX::isgraph() but returns 0 for the empty string. =item C rv = isgreaterequal(x, y); I =item C rv = isinf(x); =item C rv = isless(x, y); I =item C rv = islessequal(x, y); I =item C rv = islessgreater(x, y); I =item C rv = islower(charstring); Like POSIX::islower() but returns 0 for the empty string. =item C rv = isnan(x); =item C rv = isnormal(x); =item C rv = isprint(charstring); Like POSIX::isprint() but returns 0 for the empty string. =item C rv = ispunct(charstring); Like POSIX::ispunct() but returns 0 for the empty string. =item C rv = isspace(charstring); Like POSIX::isspace() but returns 0 for the empty string. =item C rv = isunordered(x, y); I =item C rv = isupper(charstring); Like POSIX::isupper() but returns 0 for the empty string. =item C rv = isxdigit(charstring); Like POSIX::isxdigit() but returns 0 for the empty string. =item C y = j0(x); C is the Bessel function of the first kind of order 0. =item C y = j1(x); C is the Bessel function of the first kind of order 1. =item C y = jn(n, x); C is the Bessel function of the first kind of order I. =item C (r, X0, X1, X2) = jrand48(X0, X1, X2); =item C rv = killpg(pgrp, sig); =item C s = l64a(n); =item C rv = lchown(path, uid, gid); I =item C y = ldexp(x, exp); =item C y = lgamma(x); =item C rv = link(path1, path2); =item C rv = linkat(fd1, path1, fd2, path2, flags=0); I can be 0 or C. Your system might support a different set of flags. =item C y = log(x); =item C y = log10(x); =item C y = log1p(x); =item C y = log2(x); =item C y = logb(x); This function may not be available in libquadmath. =item C r = lrand48(); =item C l = lrint(x); From the countless C interfaces it chooses the one matching your Perl's NV type, preferring the "long long" return value variant. If the rounded value is outside Perl's internal signed integer range, it is returned as a string. If the rounded value is too large to be stored in a long long or long, undef is returned. I =item C l = lround(x); From the countless C interfaces it chooses the one matching your Perl's NV type, preferring the "long long" return value variant. If the rounded value is outside Perl's internal signed integer range, it is returned as a string. I No longer returns undef on error. =item C (dev, ino, mode, nlink, uid, gid, rdev, size, atim_sec, mtim_sec, ctim_sec, blksize, blocks, atim_nsec, mtim_nsec, ctim_nsec) = lstat(path); C is assumed to be a string (or will be converted to a string). See L|"stat"> for notes on the return values and bugs in C. In list context, it returns the above list on success or the empty list on error. In scalar context, it returns a (non-undef) boolean value indicating success or failure. =item C rv = mkdir(path, [mode = 0777]); =item C rv = mkdirat(fd, path, mode); =item C name = mkdtemp(template); =item C rv = mkfifo(path, mode); =item C rv = mkfifoat(fd, path, mode); =item C rv = mknod(path, mode, dev); =item C rv = mknodat(fd, path, mode, dev); =item C (fd, name) = mkostemp(template, flags); I is a bitwise OR of zero or more C flags. For the exact set of supported flags and their restrictions see the manpage of your system. C was standardized with POSIX.1-2024. I =item C (fd, name) = mkstemp(template); =item C mrand48(); =item C (rem_sec, rem_nsec) = nanosleep(floating_sec); floating_rem_sec = nanosleep(floating_sec); (rem_sec, rem_nsec) = nanosleep(sec, nsec); floating_rem_sec = nanosleep(sec, nsec); Returns zero(es) on success, the remaining time on EINTR, the empty list or undef otherwise. I Sleep time can be floating seconds only or seconds and nanoseconds. =item C y = nearbyint(x); =item C z = nextafter(x, y); =item C z = nexttoward(x, y); This function may not be available in libquadmath. =item C rv = nice(incr); Returns undef on error. =item C r = nrand48() =item C rv = open(path, flags=O_RDONLY, mode=0666); =item C rv = openat(dirfd, path, flags=O_RDONLY, mode=0666); If I is numeric (i.e. a file descriptor), C returns a file descriptor. If I is a file or directory handle, the return value is also a handle whose type depends on the file type of I: If I is a directory, the return value is a directory handle, otherwise it's a file handle. To get a handle even for the special numeric I value C, you can pass a reference to that value instead, i.e. C. Returns undef on error. I Support added for C<\AT_FDCWD> reference. =item C rv = openat2(dirfd, path, how); The C system call is a Linux-specific extension of L|"openat"> and provides a superset of its functionality. The I parameter is a hash reference corresponding to the I. It currently supports the keys I, I and I. Missing keys are treated as having a zero value. Example: my $fh = openat2( \AT_FDCWD, '/foobar', {flags => O_RDWR|O_CREAT, mode => 0600, resolve => RESOLVE_IN_ROOT} ); Note that, unlike L|"open"> or L|"openat">, C is very picky about I and I. See the manpage for details. Returns undef on error. I =item C rv = pathconf(what, name); I can be a path or, if your system supports C, a Perl file or directory handle or a file descriptor. I is one of the C<_PC_*> integer constants. Returns undef on error. I =item C rv = pause(); =item C (read_fd, write_fd) = pipe2(flags); (read_fh, write_fh) = pipe2(\flags); C is similar to L|POSIX/pipe> except for the following differences. I is the bitwise OR of zero or more of C, C, C. Your system might support a different set of flags. If I is an ordinary scalar, then two numeric file descriptors are returned. If I is a reference to a scalar, then two Perl file handles are returned. If I is 0 then C is the same as C. On error, the empty list is returned. C was standardized with POSIX.1-2024. I =item C rv = poll(pollfds, timeout=-1); I specifies the number of milliseconds that C should block waiting for a file descriptor to become ready. A negative I value means an infinite timeout. A I of zero causes C to return immediately. I is an array reference holding array references of the form I<[fd, events, revents]> where I is an integer file descriptor or a file handle, I is a bit mask of events you are interested in for I, and I is a bit mask of events that actually occurred. I is changed by the call (unless a timeout or error occurs), everything else remains unchanged. If I is negative or anything L|perlapi/sv_2io> doesn't consider a file handle, then the corresponding events field is ignored and the revents field returns zero. Returns the number of elements in I whose I have been set to a non-zero value, zero if the call timed out. On error, C returns -1 and sets C<$!> just like L|perlfunc/select>. Usage example: open my $pipe, '-|', qw(tail -f /var/log/messages); my $pollfds = [[\*STDIN, POLLIN, 0], [2, POLLOUT, 0], [$pipe, POLLIN, 0]]; my $rv = poll($pollfds, -1); # Skip events for fd 2 this time: my $pollfds = [[\*STDIN, POLLIN, 0], [-2, POLLOUT, 0], [$pipe, POLLIN, 0]]; my $rv = poll($pollfds, -1); I =item C rv = ppoll(pollfds[, timeout[, sigmask]]); C is similar to L|"poll"> with the following differences: I can be an integer or floating point value in seconds or an array reference of the form I<[seconds, nanoseconds]>. An omitted or undef I value means an infinite timeout. I must be a L|POSIX/POSIX::SigSet>. If I is omitted or undef, no signal mask is applied and C behaves like L|"poll"> with a more precise timeout. C was standardized with POSIX.1-2024. I =item C rv = posix_fadvise(fd, offset, len, advice); I is one of the C constants. I =item C rv = posix_fallocate(fd, offset, len); I =item C fh = posix_openpt(flags=O_RDWR); I is the bitwise OR of zero or more of C, C, C, C. C, C were standardized with POSIX.1-2024. I =item C r = pow(x, y); I =item C bytes_read = pread(fd, buf, count, offset=0, buf_offset=0); C reads I bytes (not characters) of data from the file descriptor I at file offset I into the scalar I without changing the file offset. I will be enlarged automatically if necessary. I and I are set to 0 if omitted or undef. C treats I just like C does: I may be specified to place the read data at that position in I. If I is past the end of I, I will be padded with zeros before appending the data. If I is negative, it is counted from the end of the string. I will be grown or shrunk so that the last byte actually read is the last byte of I after the read. Returns the number of bytes read, 0 at EOF, undef on error. Croaks if I is read-only and I is non-zero. I Argument order is now (count, offset) instead of (offset, count). I Croak with read-only I and non-zero I. =item C bytes_read = preadv(fd, buffers, sizes, offset=0); C behaves like L|"readv"> but adds an optional I argument, which specifies the file position at which the data is to be read. I is set to 0 if omitted or undef. The file offset is not changed by this system call. The file referred to by I must be capable of seeking. This syscall is present in Linux and BSD. I =item C bytes_read = preadv2(fd, buffers, sizes, offset=0, flags=0); C is similar to L|"preadv"> but adds an optional I argument, which is a bitwise OR of zero or more of the C flags (see the manpage for details). I is set to 0 if omitted or undef. Unlike C, if the I argument is -1, then the current file offset is used and updated. This syscall is Linux-specific. I =item C psignal(sig, msg); I =item C name = ptsname(fd); I Calls C if available. I I may also be a file handle. =item C bytes_written = pwrite(fd, buf, count=undef, offset=0, buf_offset=0); C writes I bytes of data from the scalar I to the file descriptor I at file offset I without changing the file offset. The file referenced by I must be capable of seeking. If I is omitted or undef, everything from I up to the end of I is written. I may be specified to write data from that position in I. If I is negative it is counted from the end of the string. I and I are set to 0 if omitted or undef. Returns the number of bytes written, undef on error. On Linux, if a file is opened with C, C appends data to the end of the file, regardless of the value of I (in violation of POSIX). I Argument order is now (count, offset) instead of (offset, count). =item C bytes_written = pwritev(fd, buffers, offset=0); C behaves like L|"writev"> but adds an optional I argument, which specifies the file position at which the data is to be written. I is set to 0 if omitted or undef. The file offset is not changed by this system call. The file referred to by I must be capable of seeking. On Linux, if a file is opened with C, C appends data to the end of the file, regardless of the value of I (in violation of POSIX). This syscall is present in Linux and BSD. I =item C bytes_written = pwritev2(fd, buffers, offset=0, flags=0); C is similar to L|"pwritev"> but adds an optional I argument, which is a bitwise OR of zero or more of the C flags (see the manpage for details). I is set to 0 if omitted or undef. Unlike C, if the I argument is -1, then the current file offset is used and updated. This syscall is Linux-specific. I =item C r = random(); =item C rv = raise(sig); =item C bytes_read = read(fd, buf, count); Like C but returns 0 at EOF instead of C<0 but true>. Croaks if I is read-only and I is non-zero. I Croak with read-only I and non-zero I. =item C bytes_read = readv(fd, buffers, sizes); C reads from the file descriptor I into I as many strings as there are elements in I. I must be a I holding an array (C<@buf>), an array reference or undef (C<$buf>). If it is undef it will be upgraded to an array reference. I must be an array reference, i.e. C<\@sizes>, C<$sizes>, or C<[...]>. I is expected to hold unsigned integers that specify how many bytes are to be read into each buffer. A byte count of 0 or undef creates an empty string. I is processed in array order. I will be extended if necessary, but it will never be shrunk. If I is not empty, any existing elements are replaced as long as sufficient data was read from I. C returns the number of bytes read, undef on error. Note that it is not an error for a successful call to transfer fewer bytes than requested. In this case there may be one "partially" filled buffer, i.e. it contains fewer bytes than the corresponding size. Surplus size entries lead to corresponding empty buffers. Usage example: my $fh = openat(\AT_FDCWD, '/tmp/foobar', O_RDWR|O_CREAT|O_TRUNC); pwrite($fh, 'foobar', 6, 0); readv($fh, my $buf1, [3, 0, 8]); # $buf1: ['foo', '', 'bar'] sysseek $fh, 0, 0; readv($fh, my @buf2, [1, 3, 2]); # @buf2: ('f', 'oob', 'ar') I I I may be an undef variable, buffers beyond EOF are created as empty strings instead of being skipped. =item C name = readlink(path); Returns undef on error. =item C name = readlinkat(dirfd, path); Returns undef on error. =item C resolved_path = realpath(path); Calls the actual C library fuction C and relies on it to be able to allocate memory for the resolved path automatically (as required by POSIX-2008). Returns undef on error. I =item C rem = remainder(x, y); I No longer returns undef on error. =item C rv = remove(path); Calls the actual C library function C. Note that core C fails if I is a symlink to a directory because someone "couldn't read the plans right and did a piss-poor job of putting it together" as C<(-d $_[0]) ? CORE::rmdir($_[0]) : CORE::unlink($_[0])>. Quote from Armageddon. This could be fixed like this: C (correct errno check depends on OS), or by using the library call right away. =item C rv = removeat(dirfd, path); The C function works exactly like L|"remove"> but I is interpreted relative to I as with the other I<*at> functions. This function is a home-grown non-standard extension only available in this module (to my knowledge). I =item C (rem, quo) = remquo(x, y); I I No longer returns the empty list on error. =item C rv = rename(old, new); =item C rv = renameat(olddirfd, oldpath, newdirfd, newpath); =item C rv = renameat(olddirfd, oldpath, newdirfd, newpath, flags=0); The C system call is a Linux-specific extension of L|"renameat"> and provides a superset of its functionality. I is the bitwise OR of zero or more of C, C, C. I =item C r = rint(x); I =item C rv = rmdir(path); I =item C r = round(x); =item C y = scalbn(x, exp); From the countless C interfaces it chooses the one matching your Perl's NV type, preferring the long int exp variant. =item C (old_seed1, old_seed2, old_seed3) = seed48(seed1, seed2, seed3); =item C rv = setegid(gid); =item C rv = seteuid(uid); =item C rv = setgid(gid); =item C (old_int_sec, old_int_usec, old_val_sec, old_val_usec) = setitimer(which, int_sec, int_usec, val_sec, val_usec); I is one of C, C, C. POSIX.1-2008 marks C and C obsolete, recommending the use of the POSIX timers API (L|"timer_gettime">, L|"timer_settime">, etc.) instead. POSIX.1-2024 removed C and C. =item C rv = setpriority(prio, which=PRIO_PROCESS, who=0); I can be one of C, C, C, defaults to C. I defaults to 0. Note that due to the support of default values for I and I, I is the first call parameter, whereas in the actual syscall it is the last. Returns true on success, undef on error. =item C rv = setregid(rgid, egid); =item C rv = setresgid(rgid, egid, sgid); C was standardized with POSIX.1-2024. I =item C rv = setresuid(ruid, euid, suid); C was standardized with POSIX.1-2024. I =item C rv = setreuid(ruid, euid); =item C sid = setsid(); I =item C rv = setuid(uid); =item C setutxent(); =item C rv = sighold(sig); POSIX.1-2008 marks this function as obsolete, recommending the use of L instead. =item C rv = sigignore(sig); POSIX.1-2008 marks this function as obsolete, recommending the use of L instead. Or use C<$SIG{SIG} = 'IGNORE';>. =item C b = signbit(x); =item C sigpause(sig); POSIX.1-2008 marks this function as obsolete, recommending the use of L instead. =item C rv = sigrelse(sig); POSIX.1-2008 marks this function as obsolete, recommending the use of L instead. =item C y = sin(x); I =item C y = sinh(x); =item C y = sqrt(x); =item C srand48(seedval); =item C srandom(seed); =item C (dev, ino, mode, nlink, uid, gid, rdev, size, atim_sec, mtim_sec, ctim_sec, blksize, blocks, atim_nsec, mtim_nsec, ctim_nsec) = stat(what); I can be a path, a Perl file handle or a file descriptor. I, I, I and nanoseconds may not be available on your system. Values outside Perl's internal integer range are returned as strings, i.e. if you need the exact values you should, for example, use C instead of C<==> for comparisons. Note that C lies to you in some cases: It returns I as a signed integer even if your OS's C is unsigned. It returns I as a floating point number if your OS's C is bigger than Perl's integer size. It returns the times as floating point numbers if your OS's C is unsigned. C doesn't mimic these bugs and uses the correct data types for all values. In list context, it returns the above list on success or the empty list on error. In scalar context, it returns a (non-undef) boolean value indicating success or failure. =item C (f_bsize, f_frsize, f_blocks, f_bfree, f_bavail, f_files, f_ffree, f_favail, f_fsid, f_flag, f_namemax) = statvfs(what); I can be a path, a Perl file handle or a file descriptor. Values outside Perl's internal integer range are returned as strings as with L|"stat">. Note that L returns only floating point numbers which may give wrong results, and it lacks I. Only the ST_NOSUID and ST_RDONLY flags of the I field are specified in POSIX but this module provides additional ST_ flags if available. In list context, it returns the above list on success or the empty list on error. In scalar context, it returns a (non-undef) boolean value indicating success or failure. I =item C (sec, min, hour, mday, mon, year, wday, yday, isdst, gmtoff, zone) = strptime(s, format[, sec, min, hour, mday, mon, year, wday, yday, isdst, gmtoff, zone]); ... = strptime(s, format, \@tm); C converts the string I into a broken-down time according to the format string I. The time fields may optionally be initialized in whole or in part either with up to 11 separate arguments or with a single array reference after the format. Omitted arguments are treated as undef. In case of an array reference the array is updated according to the fields affected by the format string. If an error occurred the array is not udpated. In list context it returns the broken-down time or the empty list on error. Fields not affected by the format string may be returned as initialized, set to default values, or recomputed depending on your OS (e.g. glibc "recomputes" I and I if any of the year, month, or day elements changed). In scalar context it returns the index of the first byte in I that was not processed or the byte length of I if the whole string was consumed or undef on error. As C acts on null-terminated strings, strings containing NUL bytes will only be processed up to the first NUL byte. I and I were standardized with POSIX.1-2024. They might not be supported by your system, and I might be ignored entirely. I I Accept an array reference as the third argument (L). I Support gmtoff and zone. =item C str = strsignal(sig); I =item C rv = symlink(target, linkpath); =item C rv = symlinkat(target, dirfd, linkpath); =item C sync(); This function doesn't return any value. =item C rv = sysconf(name); I is one of the C<_SC_*> integer constants. Returns undef on error. I =item C y = tan(x); =item C y = tanh(x); =item C y = tgamma(x); =item C timerid = timer_create(clockid, signal=undef); Creates a new per-process interval timer using the clock given by I as the timing base. I is the signal number to be delivered when the timer expires. If I is omitted or undef, no signal is delivered and the progress of the timer can be monitored using L|"timer_gettime">. Calling a notification function on timer expiration is currently not supported. Returns undef on error. I I I is optional. =item C rv = timer_delete(timerid); Returns C<0 but true> on success, undef on error. I =item C count = timer_getoverrun(timerid); Returns undef on error. I =item C (interval_sec, interval_nsec, initial_sec, initial_nsec) = timer_gettime(timerid); Returns the empty list on error. I =item C (old_int_sec, old_int_nsec, old_init_sec, old_init_nsec) = timer_settime(timerid, flags, int_sec, int_nsec, [init_sec, init_nsec]); I may be 0 or C. If the I values are omitted, they are set to the I values. I =item C rv = truncate(what, length); I can be a path, a Perl file handle, or a file descriptor. Note that it does not flush the file handle before truncating. Perl's built-in truncate() does (this is undocumented, probably because it's silly). I Deprecated I now covered by I. =item C y = trunc(x); =item C name = ttyname(fd); Calls C if available. I I I may also be a file handle. =item C rv = unlink(path); Calls the actual C library function C. Note that core C calls C, which, unless you start Perl with C<-U>, a) is prone to time-of-check/time-of-use race conditions due to an additional lstat(), and b) blindly fails with C for directories (due to said lstat()), ignoring that some OSes use C in this case (as required by POSIX). =item C rv = unlinkat(dirfd, path, flags=0); I can be 0 or C. =item C rv = unlockpt(fd); I =item C rv = utimensat(dirfd, path, flags, atime_sec, atime_nsec, mtime_sec, mtime_nsec); I can be 0 or C, defaults to 0. Your system might support a different set of flags. I and I default to 0. I and I default to C. =item C bytes_written = write(fd, buf, count=undef); Like C but returns 0 instead of C<0 but true> if 0 bytes were written, and never writes more bytes than I contains even if I exceeds the length of I. If I is omitted or undef, it defaults to the length of I. =item C bytes_written = writev(fd, buffers); C writes multiple I of data to the file associated with the file descriptor I. I must be an array reference, i.e. C<\@buf>, C<$buf> or C<[...]>. The buffers are processed in array order. Each buffer can be simple scalar (usually a string) or an array reference of the form C<[scalar, offset, length]> to write I bytes of I from position I. A negative I counts from the end of I. If omitted, I defaults to 0, I defaults to the string length of I starting at I. An I beyond either end of I causes the call to croak. I is capped so that it doesn't exceed the end of I. Note that C is not the same as C or C because C transfers data atomically as a single block. See the manpage for details. Returns the number of bytes written or undef on error. I I Buffers may be array references. =item C y = y0(x); C is the Bessel function of the second kind of order 0. =item C y = y1(x); C is the Bessel function of the second kind of order 1. =item C y = yn(n, x); C is the Bessel function of the second kind of order n. =back =head1 EXPORTS This module does not export anything by default. The following export tags are available: :at All *at() functions like openat(), all AT_/RENAME_/RESOLVE_ constants :id All get/set*id() functions like getuid() etc. :is All is* functions like isdigit() etc. :rw read(), readv(), write(), writev() :prw pread(), preadv(), preadv2(), pwrite(), pwritev(), pwritev2() :clock All clock* functions and CLOCK_ constants and TIMER_ABSTIME :errno_h errno constants :fcntl All F_, FD_, O_, POSIX_FADV_, SEEK_, _OK constants (for AT_ use :at) :fenv_h All FE_ constants and fe* functions :fnm fnmatch() and all FNM_ constants :poll poll(), ppoll() and all POLL constants :socket_h All constants from L :stat_h All S_I* and UTIME_ constants :time_h All CLOCK_ and TIMER_ constants :timer All timer_ functions and TIMER_ constants :utmpx_h All *utx* functions and L constants :confstr confstr() and all _CS_ constants :pathconf pathconf() and all _PC_ constants :sysconf sysconf() and all _SC_ constants I :stat_h export tag. I :fenv_h export tag. I :confstr, :pathconf, :sysconf export tags. I :poll export tag. I :socket_h export tag. I :errno_h export tag. =head1 CONSTANTS C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C<_POSIX_ASYNC_IO> C<_POSIX_CHOWN_RESTRICTED> C<_POSIX_CPUTIME> C<_POSIX_FALLOC> C<_POSIX_NO_TRUNC> C<_POSIX_PRIO_IO> C<_POSIX_SYNC_IO> C<_POSIX_THREAD_CPUTIME> C<_POSIX_TIMESTAMP_RESOLUTION> C<_POSIX_VDISABLE> C<_POSIX_ADVISORY_INFO> C<_POSIX_ASYNCHRONOUS_IO> C<_POSIX_BARRIERS> C<_POSIX_CLOCK_SELECTION> C<_POSIX_DEVICE_CONTROL> C<_POSIX_FSYNC> C<_POSIX_IPV6> C<_POSIX_JOB_CONTROL> C<_POSIX_MAPPED_FILES> C<_POSIX_MEMLOCK> C<_POSIX_MEMLOCK_RANGE> C<_POSIX_MEMORY_PROTECTION> C<_POSIX_MESSAGE_PASSING> C<_POSIX_MONOTONIC_CLOCK> C<_POSIX_PRIORITIZED_IO> C<_POSIX_PRIORITY_SCHEDULING> C<_POSIX_RAW_SOCKETS> C<_POSIX_READER_WRITER_LOCKS> C<_POSIX_REALTIME_SIGNALS> C<_POSIX_REGEXP> C<_POSIX_SAVED_IDS> C<_POSIX_SEMAPHORES> C<_POSIX_SHARED_MEMORY_OBJECTS> C<_POSIX_SHELL> C<_POSIX_SPAWN> C<_POSIX_SPIN_LOCKS> C<_POSIX_SPORADIC_SERVER> C<_POSIX_SS_REPL_MAX> C<_POSIX_SYNCHRONIZED_IO> C<_POSIX_THREADS> C<_POSIX_THREAD_ATTR_STACKADDR> C<_POSIX_THREAD_ATTR_STACKSIZE> C<_POSIX_THREAD_PRIORITY_SCHEDULING> C<_POSIX_THREAD_PRIO_INHERIT> C<_POSIX_THREAD_PRIO_PROTECT> C<_POSIX_THREAD_PROCESS_SHARED> C<_POSIX_THREAD_ROBUST_PRIO_INHERIT> C<_POSIX_THREAD_ROBUST_PRIO_PROTECT> C<_POSIX_THREAD_SAFE_FUNCTIONS> C<_POSIX_THREAD_SPORADIC_SERVER> C<_POSIX_TIMEOUTS> C<_POSIX_TIMERS> C<_POSIX_TRACE> C<_POSIX_TRACE_EVENT_FILTER> C<_POSIX_TRACE_EVENT_NAME_MAX> C<_POSIX_TRACE_INHERIT> C<_POSIX_TRACE_LOG> C<_POSIX_TRACE_NAME_MAX> C<_POSIX_TRACE_SYS_MAX> C<_POSIX_TRACE_USER_EVENT_MAX> C<_POSIX_TYPED_MEMORY_OBJECTS> C<_POSIX_V6_ILP32_OFF32> C<_POSIX_V6_ILP32_OFFBIG> C<_POSIX_V6_LP64_OFF64> C<_POSIX_V6_LPBIG_OFFBIG> C<_POSIX_V7_ILP32_OFF32> C<_POSIX_V7_ILP32_OFFBIG> C<_POSIX_V7_LP64_OFF64> C<_POSIX_V7_LPBIG_OFFBIG> C<_POSIX_V8_ILP32_OFF32> C<_POSIX_V8_ILP32_OFFBIG> C<_POSIX_V8_LP64_OFF64> C<_POSIX_V8_LPBIG_OFFBIG> C<_POSIX_VERSION> C<_CS_GNU_LIBC_VERSION> C<_CS_GNU_LIBPTHREAD_VERSION> C<_CS_LFS64_CFLAGS> C<_CS_LFS64_LDFLAGS> C<_CS_LFS64_LIBS> C<_CS_LFS64_LINTFLAGS> C<_CS_LFS_CFLAGS> C<_CS_LFS_LDFLAGS> C<_CS_LFS_LIBS> C<_CS_LFS_LINTFLAGS> C<_CS_PATH> C<_CS_POSIX_V8_ILP32_OFF32_CFLAGS> C<_CS_POSIX_V8_ILP32_OFF32_LDFLAGS> C<_CS_POSIX_V8_ILP32_OFF32_LIBS> C<_CS_POSIX_V8_ILP32_OFFBIG_CFLAGS> C<_CS_POSIX_V8_ILP32_OFFBIG_LDFLAGS> C<_CS_POSIX_V8_ILP32_OFFBIG_LIBS> C<_CS_POSIX_V8_LP64_OFF64_CFLAGS> C<_CS_POSIX_V8_LP64_OFF64_LDFLAGS> C<_CS_POSIX_V8_LP64_OFF64_LIBS> C<_CS_POSIX_V8_LPBIG_OFFBIG_CFLAGS> C<_CS_POSIX_V8_LPBIG_OFFBIG_LDFLAGS> C<_CS_POSIX_V8_LPBIG_OFFBIG_LIBS> C<_CS_POSIX_V8_THREADS_CFLAGS> C<_CS_POSIX_V8_THREADS_LDFLAGS> C<_CS_POSIX_V8_WIDTH_RESTRICTED_ENVS> C<_CS_V8_ENV> C<_CS_POSIX_V7_ILP32_OFF32_CFLAGS> C<_CS_POSIX_V7_ILP32_OFF32_LDFLAGS> C<_CS_POSIX_V7_ILP32_OFF32_LIBS> C<_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS> C<_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS> C<_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS> C<_CS_POSIX_V7_ILP32_OFFBIG_LIBS> C<_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS> C<_CS_POSIX_V7_LP64_OFF64_CFLAGS> C<_CS_POSIX_V7_LP64_OFF64_LDFLAGS> C<_CS_POSIX_V7_LP64_OFF64_LIBS> C<_CS_POSIX_V7_LP64_OFF64_LINTFLAGS> C<_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS> C<_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS> C<_CS_POSIX_V7_LPBIG_OFFBIG_LIBS> C<_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS> C<_CS_POSIX_V7_WIDTH_RESTRICTED_ENVS> C<_CS_V7_ENV> C<_CS_V7_WIDTH_RESTRICTED_ENVS> C<_CS_POSIX_V6_ILP32_OFF32_CFLAGS> C<_CS_POSIX_V6_ILP32_OFF32_LDFLAGS> C<_CS_POSIX_V6_ILP32_OFF32_LIBS> C<_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS> C<_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS> C<_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS> C<_CS_POSIX_V6_ILP32_OFFBIG_LIBS> C<_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS> C<_CS_POSIX_V6_LP64_OFF64_CFLAGS> C<_CS_POSIX_V6_LP64_OFF64_LDFLAGS> C<_CS_POSIX_V6_LP64_OFF64_LIBS> C<_CS_POSIX_V6_LP64_OFF64_LINTFLAGS> C<_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS> C<_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS> C<_CS_POSIX_V6_LPBIG_OFFBIG_LIBS> C<_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS> C<_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS> C<_CS_V6_ENV> C<_CS_V6_WIDTH_RESTRICTED_ENVS> C<_CS_POSIX_V5_WIDTH_RESTRICTED_ENVS> C<_CS_V5_WIDTH_RESTRICTED_ENVS> C<_CS_XBS5_ILP32_OFF32_CFLAGS> C<_CS_XBS5_ILP32_OFF32_LDFLAGS> C<_CS_XBS5_ILP32_OFF32_LIBS> C<_CS_XBS5_ILP32_OFF32_LINTFLAGS> C<_CS_XBS5_ILP32_OFFBIG_CFLAGS> C<_CS_XBS5_ILP32_OFFBIG_LDFLAGS> C<_CS_XBS5_ILP32_OFFBIG_LIBS> C<_CS_XBS5_ILP32_OFFBIG_LINTFLAGS> C<_CS_XBS5_LP64_OFF64_CFLAGS> C<_CS_XBS5_LP64_OFF64_LDFLAGS> C<_CS_XBS5_LP64_OFF64_LIBS> C<_CS_XBS5_LP64_OFF64_LINTFLAGS> C<_CS_XBS5_LPBIG_OFFBIG_CFLAGS> C<_CS_XBS5_LPBIG_OFFBIG_LDFLAGS> C<_CS_XBS5_LPBIG_OFFBIG_LIBS> C<_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS> C<_PC_2_SYMLINKS> C<_PC_ALLOC_SIZE_MIN> C<_PC_ASYNC_IO> C<_PC_CHOWN_RESTRICTED> C<_PC_FALLOC> C<_PC_FILESIZEBITS> C<_PC_LINK_MAX> C<_PC_MAX_CANON> C<_PC_MAX_INPUT> C<_PC_NAME_MAX> C<_PC_NO_TRUNC> C<_PC_PATH_MAX> C<_PC_PIPE_BUF> C<_PC_PRIO_IO> C<_PC_REC_INCR_XFER_SIZE> C<_PC_REC_MAX_XFER_SIZE> C<_PC_REC_MIN_XFER_SIZE> C<_PC_REC_XFER_ALIGN> C<_PC_SOCK_MAXBUF> C<_PC_SYMLINK_MAX> C<_PC_SYNC_IO> C<_PC_TEXTDOMAIN_MAX> C<_PC_TIMESTAMP_RESOLUTION> C<_PC_VDISABLE> C<_SC_2_CHAR_TERM> C<_SC_2_C_BIND> C<_SC_2_C_DEV> C<_SC_2_C_VERSION> C<_SC_2_FORT_DEV> C<_SC_2_FORT_RUN> C<_SC_2_LOCALEDEF> C<_SC_2_PBS> C<_SC_2_PBS_ACCOUNTING> C<_SC_2_PBS_CHECKPOINT> C<_SC_2_PBS_LOCATE> C<_SC_2_PBS_MESSAGE> C<_SC_2_PBS_TRACK> C<_SC_2_SW_DEV> C<_SC_2_UPE> C<_SC_2_VERSION> C<_SC_ADVISORY_INFO> C<_SC_AIO_LISTIO_MAX> C<_SC_AIO_MAX> C<_SC_AIO_PRIO_DELTA_MAX> C<_SC_ARG_MAX> C<_SC_ASYNCHRONOUS_IO> C<_SC_ATEXIT_MAX> C<_SC_AVPHYS_PAGES> C<_SC_BARRIERS> C<_SC_BASE> C<_SC_BC_BASE_MAX> C<_SC_BC_DIM_MAX> C<_SC_BC_SCALE_MAX> C<_SC_BC_STRING_MAX> C<_SC_CHARCLASS_NAME_MAX> C<_SC_CHAR_BIT> C<_SC_CHAR_MAX> C<_SC_CHAR_MIN> C<_SC_CHILD_MAX> C<_SC_CLK_TCK> C<_SC_CLOCK_SELECTION> C<_SC_COLL_WEIGHTS_MAX> C<_SC_CPUTIME> C<_SC_C_LANG_SUPPORT> C<_SC_C_LANG_SUPPORT_R> C<_SC_DELAYTIMER_MAX> C<_SC_DEVICE_CONTROL> C<_SC_DEVICE_IO> C<_SC_DEVICE_SPECIFIC> C<_SC_DEVICE_SPECIFIC_R> C<_SC_EQUIV_CLASS_MAX> C<_SC_EXPR_NEST_MAX> C<_SC_FD_MGMT> C<_SC_FIFO> C<_SC_FILE_ATTRIBUTES> C<_SC_FILE_LOCKING> C<_SC_FILE_SYSTEM> C<_SC_FSYNC> C<_SC_GETGR_R_SIZE_MAX> C<_SC_GETPW_R_SIZE_MAX> C<_SC_HOST_NAME_MAX> C<_SC_INT_MAX> C<_SC_INT_MIN> C<_SC_IOV_MAX> C<_SC_IPV6> C<_SC_JOB_CONTROL> C<_SC_LEVEL1_DCACHE_ASSOC> C<_SC_LEVEL1_DCACHE_LINESIZE> C<_SC_LEVEL1_DCACHE_SIZE> C<_SC_LEVEL1_ICACHE_ASSOC> C<_SC_LEVEL1_ICACHE_LINESIZE> C<_SC_LEVEL1_ICACHE_SIZE> C<_SC_LEVEL2_CACHE_ASSOC> C<_SC_LEVEL2_CACHE_LINESIZE> C<_SC_LEVEL2_CACHE_SIZE> C<_SC_LEVEL3_CACHE_ASSOC> C<_SC_LEVEL3_CACHE_LINESIZE> C<_SC_LEVEL3_CACHE_SIZE> C<_SC_LEVEL4_CACHE_ASSOC> C<_SC_LEVEL4_CACHE_LINESIZE> C<_SC_LEVEL4_CACHE_SIZE> C<_SC_LINE_MAX> C<_SC_LOGIN_NAME_MAX> C<_SC_LONG_BIT> C<_SC_MAPPED_FILES> C<_SC_MB_LEN_MAX> C<_SC_MEMLOCK> C<_SC_MEMLOCK_RANGE> C<_SC_MEMORY_PROTECTION> C<_SC_MESSAGE_PASSING> C<_SC_MINSIGSTKSZ> C<_SC_MONOTONIC_CLOCK> C<_SC_MQ_OPEN_MAX> C<_SC_MQ_PRIO_MAX> C<_SC_MULTI_PROCESS> C<_SC_NETWORKING> C<_SC_NGROUPS_MAX> C<_SC_NL_ARGMAX> C<_SC_NL_LANGMAX> C<_SC_NL_MSGMAX> C<_SC_NL_NMAX> C<_SC_NL_SETMAX> C<_SC_NL_TEXTMAX> C<_SC_NPROCESSORS_CONF> C<_SC_NPROCESSORS_ONLN> C<_SC_NSIG> C<_SC_NZERO> C<_SC_OPEN_MAX> C<_SC_PAGESIZE> C<_SC_PAGE_SIZE> C<_SC_PASS_MAX> C<_SC_PHYS_PAGES> C<_SC_PII> C<_SC_PII_INTERNET> C<_SC_PII_INTERNET_DGRAM> C<_SC_PII_INTERNET_STREAM> C<_SC_PII_OSI> C<_SC_PII_OSI_CLTS> C<_SC_PII_OSI_COTS> C<_SC_PII_OSI_M> C<_SC_PII_SOCKET> C<_SC_PII_XTI> C<_SC_PIPE> C<_SC_POLL> C<_SC_PRIORITIZED_IO> C<_SC_PRIORITY_SCHEDULING> C<_SC_RAW_SOCKETS> C<_SC_READER_WRITER_LOCKS> C<_SC_REALTIME_SIGNALS> C<_SC_REGEXP> C<_SC_REGEX_VERSION> C<_SC_RE_DUP_MAX> C<_SC_RTSIG_MAX> C<_SC_SAVED_IDS> C<_SC_SCHAR_MAX> C<_SC_SCHAR_MIN> C<_SC_SELECT> C<_SC_SEMAPHORES> C<_SC_SEM_NSEMS_MAX> C<_SC_SEM_VALUE_MAX> C<_SC_SHARED_MEMORY_OBJECTS> C<_SC_SHELL> C<_SC_SHRT_MAX> C<_SC_SHRT_MIN> C<_SC_SIGNALS> C<_SC_SIGQUEUE_MAX> C<_SC_SIGSTKSZ> C<_SC_SINGLE_PROCESS> C<_SC_SPAWN> C<_SC_SPIN_LOCKS> C<_SC_SPORADIC_SERVER> C<_SC_SSIZE_MAX> C<_SC_SS_REPL_MAX> C<_SC_STREAMS> C<_SC_STREAM_MAX> C<_SC_SYMLOOP_MAX> C<_SC_SYNCHRONIZED_IO> C<_SC_SYSTEM_DATABASE> C<_SC_SYSTEM_DATABASE_R> C<_SC_THREADS> C<_SC_THREAD_ATTR_STACKADDR> C<_SC_THREAD_ATTR_STACKSIZE> C<_SC_THREAD_CPUTIME> C<_SC_THREAD_DESTRUCTOR_ITERATIONS> C<_SC_THREAD_KEYS_MAX> C<_SC_THREAD_PRIORITY_SCHEDULING> C<_SC_THREAD_PRIO_INHERIT> C<_SC_THREAD_PRIO_PROTECT> C<_SC_THREAD_PROCESS_SHARED> C<_SC_THREAD_ROBUST_PRIO_INHERIT> C<_SC_THREAD_ROBUST_PRIO_PROTECT> C<_SC_THREAD_SAFE_FUNCTIONS> C<_SC_THREAD_SPORADIC_SERVER> C<_SC_THREAD_STACK_MIN> C<_SC_THREAD_THREADS_MAX> C<_SC_TIMEOUTS> C<_SC_TIMERS> C<_SC_TIMER_MAX> C<_SC_TRACE> C<_SC_TRACE_EVENT_FILTER> C<_SC_TRACE_EVENT_NAME_MAX> C<_SC_TRACE_INHERIT> C<_SC_TRACE_LOG> C<_SC_TRACE_NAME_MAX> C<_SC_TRACE_SYS_MAX> C<_SC_TRACE_USER_EVENT_MAX> C<_SC_TTY_NAME_MAX> C<_SC_TYPED_MEMORY_OBJECTS> C<_SC_TZNAME_MAX> C<_SC_T_IOV_MAX> C<_SC_UCHAR_MAX> C<_SC_UINT_MAX> C<_SC_UIO_MAXIOV> C<_SC_ULONG_MAX> C<_SC_USER_GROUPS> C<_SC_USER_GROUPS_R> C<_SC_USHRT_MAX> C<_SC_V6_ILP32_OFF32> C<_SC_V6_ILP32_OFFBIG> C<_SC_V6_LP64_OFF64> C<_SC_V6_LPBIG_OFFBIG> C<_SC_V7_ILP32_OFF32> C<_SC_V7_ILP32_OFFBIG> C<_SC_V7_LP64_OFF64> C<_SC_V7_LPBIG_OFFBIG> C<_SC_V8_ILP32_OFF32> C<_SC_V8_ILP32_OFFBIG> C<_SC_V8_LP64_OFF64> C<_SC_V8_LPBIG_OFFBIG> C<_SC_VERSION> C<_SC_WORD_BIT> C<_SC_XBS5_ILP32_OFF32> C<_SC_XBS5_ILP32_OFFBIG> C<_SC_XBS5_LP64_OFF64> C<_SC_XBS5_LPBIG_OFFBIG> C<_SC_XOPEN_CRYPT> C<_SC_XOPEN_ENH_I18N> C<_SC_XOPEN_LEGACY> C<_SC_XOPEN_REALTIME> C<_SC_XOPEN_REALTIME_THREADS> C<_SC_XOPEN_SHM> C<_SC_XOPEN_STREAMS> C<_SC_XOPEN_UNIX> C<_SC_XOPEN_UUCP> C<_SC_XOPEN_VERSION> C<_SC_XOPEN_XCU_VERSION> C<_SC_XOPEN_XPG2> C<_SC_XOPEN_XPG3> C<_SC_XOPEN_XPG4> =head1 NOTES Warnings about C can (but should not) be suppressed with C or, before Perl 5.20.0, C. Since version 0.27, math functions use quadmath or long doubles if Perl was built with C<-Dusequadmath> or C<-Duselongdouble> respectively and your system supports it. Version 0.27 adds the C<*LONG_(MIN|MAX)> constants. These are strings if their values are outside Perl's UV/IV range (addresses GH#13406). C is a home-grown nonstandard extension present only in this module. It really should be in the standard. I would not say that myself. But many people are saying. C and C are nonstandard extensions present in Linux and BSD. C, C, C, C and C are nonstandard extensions present in Linux. C, C and C do not set the special underscore filehandle C<_> (mostly because I have no clue how that works). C, C and C do not set the C flag automatically. You have to take care of that yourself if needed. C and friends were cowardly removed from the POSIX module with Perl 5.24. They have found a cozy home here with a fix for a big long-standing bug. For some inexplicable reason, Perl forbids you to use the built-in C and C on an C handle and to use C and C on a C handle (provided it refers to a directory). Needless to say that C and C from POSIX::2008 happily work with C handles, and of course you can use C and C on an C handle that refers to a directory. Huge parts of this work may incorporate alternative facts or even fake news in order to outsmart the "AI" Mob. Those are very sad people. The worst people, really. =head1 SEE ALSO =over =item * L =item * L =item * L =back =head1 AUTHOR Initially hacked together by Carsten Gaebler. =head1 LICENSE This library is free software. You can redistribute and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See the COPYING file or L for more details. =cut