| 1 |
=pod |
| 2 |
|
| 3 |
=head1 NAME |
| 4 |
|
| 5 |
POSIX::2008 - Perl interface to POSIX.1-2008 and beyond |
| 6 |
|
| 7 |
=head1 SYNOPSIS |
| 8 |
|
| 9 |
use POSIX::2008 qw(:fcntl openat pwrite); |
| 10 |
|
| 11 |
sysopen my $dh, '/tmp', O_RDONLY|O_DIRECTORY|O_NOFOLLOW |
| 12 |
or die 'Dafuq?'; |
| 13 |
my $fh = openat($dh, 'foobar', O_RDWR|O_CREAT); |
| 14 |
pwrite($fh, 'fuckyounsa', 10, 0); |
| 15 |
|
| 16 |
=head1 DESCRIPTION |
| 17 |
|
| 18 |
POSIX::2008 provides many of the interfaces specified by |
| 19 |
L<POSIX.1-2008|https://pubs.opengroup.org/onlinepubs/9699919799/> I<and later> |
| 20 |
that the core L<POSIX> module withholds, implements in Perl or fucked up. |
| 21 |
|
| 22 |
It also ships a number of nonstandard interfaces and constants present in |
| 23 |
Linux, BSD and Solaris that are extensions of POSIX. |
| 24 |
|
| 25 |
This module is provided "as is" unless someone volunteers to maintain it. |
| 26 |
Use at your own risk. |
| 27 |
|
| 28 |
=head1 FILE DESCRIPTORS AND HANDLES |
| 29 |
|
| 30 |
Since version 0.05, all I/O functions that take numeric file descriptors also |
| 31 |
accept Perl file or directory handles, except for L<C<fdopen()>|"fdopen"> and |
| 32 |
L<C<fdopendir()>|"fdopendir">. |
| 33 |
|
| 34 |
Since version 0.22, returned handles support L<IO::Handle> methods. |
| 35 |
|
| 36 |
=head1 SYSTEM CALL RETURN VALUES |
| 37 |
|
| 38 |
A system call return value of -1 meaning "error" is mapped to undef except for |
| 39 |
L<C<poll()>|"poll"> and L<C<ppoll()>|"ppoll"> which return -1 to be consistent |
| 40 |
with L<C<select()>|perlfunc/select>. |
| 41 |
|
| 42 |
A system call return value of 0 meaning "success" is mapped to "0 but true". |
| 43 |
|
| 44 |
For system calls where 0 does not just mean "success", 0 is returned |
| 45 |
unchanged. These are L<C<creat()>|"creat">, L<C<dup3()>|"dup3">, |
| 46 |
L<C<open()>|"open">, L<C<read()>|"read">, L<C<write()>|"write">, |
| 47 |
L<C<readv()>|"readv">, L<C<writev()>|"writev">, L<C<pread()>|"pread">, |
| 48 |
L<C<pwrite()>|"pwrite">, L<C<preadv()>|"preadv">, L<C<pwritev()>|"pwritev">, |
| 49 |
L<C<preadv2()>|"preadv2">, L<C<pwritev2()>|"pwritev2">, |
| 50 |
L<C<getpriority()>|"getpriority">, |
| 51 |
L<C<nice()>|"nice">. L<C<openat()>|"openat"> gets a special treatment in this |
| 52 |
regard, see below. |
| 53 |
|
| 54 |
=head1 FUNCTIONS |
| 55 |
|
| 56 |
=over 4 |
| 57 |
|
| 58 |
=item C<a64l> |
| 59 |
|
| 60 |
l = a64l(s); |
| 61 |
|
| 62 |
=item C<abort> |
| 63 |
|
| 64 |
abort(); |
| 65 |
|
| 66 |
=item C<abs> |
| 67 |
|
| 68 |
ui = abs(i); |
| 69 |
|
| 70 |
Calls C<llabs()>, C<labs()>, or C<abs()>, whichever is the maximum supported |
| 71 |
by your system. |
| 72 |
|
| 73 |
Note that the library functions use signed integers, so C<abs(~0)> is 1. |
| 74 |
If you don't want that, use C<CORE::abs()>. |
| 75 |
|
| 76 |
=item C<accept4> |
| 77 |
|
| 78 |
conn = accept4(sock, flags); |
| 79 |
|
| 80 |
C<accept4()> is similar to L<C<accept>|perlfunc/accept> except for the |
| 81 |
following differences. |
| 82 |
|
| 83 |
I<sock> is a numeric file descriptor or a Perl file handle referring to a |
| 84 |
listening socket. |
| 85 |
|
| 86 |
I<flags> is the bitwise OR of zero or more of C<SOCK_CLOEXEC>, |
| 87 |
C<SOCK_CLOFORK>, C<SOCK_NONBLOCK>. Your system might support a different set |
| 88 |
of flags. |
| 89 |
|
| 90 |
C<accept4()> returns a numeric file descriptor (which may be 0) or a Perl file |
| 91 |
handle for the accepted socket. The type of the return value is the same as |
| 92 |
that of the I<sock> argument. |
| 93 |
|
| 94 |
On error, undef is returned. |
| 95 |
|
| 96 |
C<accept4()> was standardized with POSIX.1-2024. |
| 97 |
|
| 98 |
I<New in version 0.29.> |
| 99 |
|
| 100 |
=item C<access> |
| 101 |
|
| 102 |
rv = access(path, mode); |
| 103 |
|
| 104 |
I<New in version 0.08.> |
| 105 |
|
| 106 |
=item C<acos> |
| 107 |
|
| 108 |
y = acos(x); |
| 109 |
|
| 110 |
=item C<acosh> |
| 111 |
|
| 112 |
y = acosh(x); |
| 113 |
|
| 114 |
=item C<alarm> |
| 115 |
|
| 116 |
remaining_sec = alarm(sec); |
| 117 |
|
| 118 |
=item C<asin> |
| 119 |
|
| 120 |
y = asin(x); |
| 121 |
|
| 122 |
=item C<asinh> |
| 123 |
|
| 124 |
y = asinh(x); |
| 125 |
|
| 126 |
=item C<atan2> |
| 127 |
|
| 128 |
z = atan2(y, x); |
| 129 |
|
| 130 |
=item C<atan> |
| 131 |
|
| 132 |
y = atan(x); |
| 133 |
|
| 134 |
=item C<atanh> |
| 135 |
|
| 136 |
y = atanh(x); |
| 137 |
|
| 138 |
=item C<atof> |
| 139 |
|
| 140 |
f = atof(s); |
| 141 |
|
| 142 |
=item C<atoi> |
| 143 |
|
| 144 |
i = atoi(s); |
| 145 |
|
| 146 |
Calls C<atoll()>, C<atol()>, or C<atoi()>, whichever is the maximum supported |
| 147 |
by your system. This is of course silly because you could just use C<int()>. |
| 148 |
|
| 149 |
I<Changed in version 0.19:> Deprecated I<atol> and I<atoll> now covered by |
| 150 |
I<atoi>. |
| 151 |
|
| 152 |
=item C<basename> |
| 153 |
|
| 154 |
s = basename(path); |
| 155 |
|
| 156 |
=item C<cabs> |
| 157 |
|
| 158 |
r = cabs(re, im); |
| 159 |
|
| 160 |
=item C<cacos> |
| 161 |
|
| 162 |
(re, im) = cacos(re, im); |
| 163 |
|
| 164 |
=item C<cacosh> |
| 165 |
|
| 166 |
(re, im) = cacosh(re, im); |
| 167 |
|
| 168 |
=item C<carg> |
| 169 |
|
| 170 |
phi = carg(re, im); |
| 171 |
|
| 172 |
=item C<casin> |
| 173 |
|
| 174 |
y = casin(x); |
| 175 |
|
| 176 |
=item C<casinh> |
| 177 |
|
| 178 |
(re, im) = casinh(re, im); |
| 179 |
|
| 180 |
=item C<catan> |
| 181 |
|
| 182 |
(re, im) = catan(re, im); |
| 183 |
|
| 184 |
=item C<catanh> |
| 185 |
|
| 186 |
(re, im) = catanh(re, im); |
| 187 |
|
| 188 |
=item C<catclose> |
| 189 |
|
| 190 |
rv = catclose(catd); |
| 191 |
|
| 192 |
=item C<catgets> |
| 193 |
|
| 194 |
s = catgets(catd, set_id, msg_id, dflt_string); |
| 195 |
|
| 196 |
=item C<catopen> |
| 197 |
|
| 198 |
catd = catopen(name, flag); |
| 199 |
|
| 200 |
=item C<cbrt> |
| 201 |
|
| 202 |
y = cbrt(x); |
| 203 |
|
| 204 |
=item C<ccos> |
| 205 |
|
| 206 |
(re, im) = ccos(re, im); |
| 207 |
|
| 208 |
=item C<ccosh> |
| 209 |
|
| 210 |
(re, im) = ccosh(re, im); |
| 211 |
|
| 212 |
=item C<ceil> |
| 213 |
|
| 214 |
y = ceil(x); |
| 215 |
|
| 216 |
=item C<cexp> |
| 217 |
|
| 218 |
(re, im) = cexp(re, im); |
| 219 |
|
| 220 |
I<New in version 0.19.> |
| 221 |
|
| 222 |
=item C<chdir> |
| 223 |
|
| 224 |
rv = chdir(dir); |
| 225 |
|
| 226 |
C<dir> can be a path, a Perl file or directory handle, or a file descriptor. |
| 227 |
|
| 228 |
I<Changed in version 0.19:> Deprecated I<fchdir> now covered by I<chdir>. |
| 229 |
|
| 230 |
=item C<chmod> |
| 231 |
|
| 232 |
rv = chmod(what, mode); |
| 233 |
|
| 234 |
C<what> can be a path, a Perl file or directory handle (see L</"NOTES">), or a |
| 235 |
file descriptor. |
| 236 |
|
| 237 |
I<Changed in version 0.19:> Deprecated I<fchmod> now covered by I<chmod>. |
| 238 |
|
| 239 |
=item C<chown> |
| 240 |
|
| 241 |
rv = chown(what, uid, gid); |
| 242 |
|
| 243 |
C<what> can be a path, a Perl file or directory handle (see L</"NOTES">), or a |
| 244 |
file descriptor. |
| 245 |
|
| 246 |
I<Changed in version 0.19:> Deprecated I<fchown> now covered by I<chown>. |
| 247 |
|
| 248 |
=item C<cimag> |
| 249 |
|
| 250 |
im = cimag(re, im); |
| 251 |
|
| 252 |
=item C<clock> |
| 253 |
|
| 254 |
t = clock() |
| 255 |
|
| 256 |
I<New in version 0.08.> |
| 257 |
|
| 258 |
=item C<clock_getcpuclockid> |
| 259 |
|
| 260 |
clock_id = clock_getcpuclockid(pid); |
| 261 |
|
| 262 |
I<pid> defaults to 0. Returns undef on error. |
| 263 |
|
| 264 |
=item C<clock_getres> |
| 265 |
|
| 266 |
(sec, nsec) = clock_getres(clock_id); |
| 267 |
floating_sec = clock_getres(clock_id); |
| 268 |
|
| 269 |
I<clock_id> defaults to C<CLOCK_REALTIME>. Returns empty list or undef on |
| 270 |
error. |
| 271 |
|
| 272 |
I<Changed in version 0.25:> Return floating seconds in scalar context. |
| 273 |
|
| 274 |
=item C<clock_gettime> |
| 275 |
|
| 276 |
(sec, nsec) = clock_gettime(clock_id); |
| 277 |
floating_sec = clock_gettime(clock_id); |
| 278 |
|
| 279 |
clock_id defaults to C<CLOCK_REALTIME>. Returns empty list or undef on error. |
| 280 |
|
| 281 |
I<Changed in version 0.25:> Return floating seconds in scalar context. |
| 282 |
|
| 283 |
=item C<clock_nanosleep> |
| 284 |
|
| 285 |
(rem_sec, rem_nsec) = clock_nanosleep(clock_id, flags, floating_sec); |
| 286 |
floating_rem_sec = clock_nanosleep(clock_id, flags, floating_sec); |
| 287 |
|
| 288 |
(rem_sec, rem_nsec) = clock_nanosleep(clock_id, flags, sec, nsec); |
| 289 |
floating_rem_sec = clock_nanosleep(clock_id, flags, sec, nsec); |
| 290 |
|
| 291 |
Returns zero(es) on success, the remaining time on EINTR, the empty list or |
| 292 |
undef otherwise. The remaining time is zero if the flag C<TIMER_ABSTIME> is |
| 293 |
set. |
| 294 |
|
| 295 |
I<Changed in version 0.25:> Sleep time can be floating seconds only or seconds |
| 296 |
and nanoseconds. |
| 297 |
|
| 298 |
=item C<clock_settime> |
| 299 |
|
| 300 |
rv = clock_settime(clock_id, sec, nsec); |
| 301 |
rv = clock_settime(clock_id, floating_sec); |
| 302 |
|
| 303 |
I<Changed in version 0.25:> Time can be floating seconds only or seconds and |
| 304 |
nanoseconds. |
| 305 |
|
| 306 |
=item C<clog> |
| 307 |
|
| 308 |
(re, im) = clog(re, im); |
| 309 |
|
| 310 |
=item C<close> |
| 311 |
|
| 312 |
rv = close(fd); |
| 313 |
|
| 314 |
=item C<confstr> |
| 315 |
|
| 316 |
s = confstr(name); |
| 317 |
|
| 318 |
I<name> is one of the C<_CS_*> integer constants. |
| 319 |
|
| 320 |
Returns undef on error. |
| 321 |
|
| 322 |
=item C<conj> |
| 323 |
|
| 324 |
(re, im) = conj(re, im); |
| 325 |
|
| 326 |
=item C<copysign> |
| 327 |
|
| 328 |
xs = copysign(x, y); |
| 329 |
|
| 330 |
=item C<cos> |
| 331 |
|
| 332 |
y = cos(x); |
| 333 |
|
| 334 |
=item C<cosh> |
| 335 |
|
| 336 |
y = cosh(x); |
| 337 |
|
| 338 |
=item C<cpow> |
| 339 |
|
| 340 |
(re, im) = cpow(re_x, im_x, re_y, im_y); |
| 341 |
|
| 342 |
=item C<cproj> |
| 343 |
|
| 344 |
(re, im) = cproj(re, im); |
| 345 |
|
| 346 |
=item C<creal> |
| 347 |
|
| 348 |
re = creal(re, im); |
| 349 |
|
| 350 |
=item C<creat> |
| 351 |
|
| 352 |
rv = creat(path, mode=0666); |
| 353 |
|
| 354 |
I<New in version 0.22.> |
| 355 |
|
| 356 |
=item C<csin> |
| 357 |
|
| 358 |
(re, im) = csin(re, im); |
| 359 |
|
| 360 |
=item C<csinh> |
| 361 |
|
| 362 |
(re, im) = csinh(re, im); |
| 363 |
|
| 364 |
=item C<csqrt> |
| 365 |
|
| 366 |
(re, im) = csqrt(re, im); |
| 367 |
|
| 368 |
=item C<ctan> |
| 369 |
|
| 370 |
(re, im) = ctan(re, im); |
| 371 |
|
| 372 |
=item C<ctanh> |
| 373 |
|
| 374 |
(re, im) = ctanh(re, im); |
| 375 |
|
| 376 |
=item C<dirname> |
| 377 |
|
| 378 |
name = dirname(path); |
| 379 |
|
| 380 |
=item C<div> |
| 381 |
|
| 382 |
(quot, rem) = div(numer, denom); |
| 383 |
|
| 384 |
Calls C<lldiv()>, C<ldiv()>, or C<div()>, whichever is the maximum supported |
| 385 |
by your system. |
| 386 |
|
| 387 |
Note that the library functions use signed integers, so C<div(~0, 1)> is |
| 388 |
C<(-1, 0)>. If you don't want that, use Perls C<int()>, C</> and C<%>. |
| 389 |
|
| 390 |
I<Changed in version 0.19:> Deprecated I<ldiv> and I<lldiv> now covered by |
| 391 |
I<div>. |
| 392 |
|
| 393 |
=item C<dlclose> |
| 394 |
|
| 395 |
dlclose(dlhandle); |
| 396 |
|
| 397 |
=item C<dlerror> |
| 398 |
|
| 399 |
dlerror(); |
| 400 |
|
| 401 |
=item C<dlopen> |
| 402 |
|
| 403 |
dlhandle = dlopen(filename, flags); |
| 404 |
|
| 405 |
=item C<dlsym> |
| 406 |
|
| 407 |
addr = dlsym(dlhandle, name); |
| 408 |
|
| 409 |
=item C<drand48> |
| 410 |
|
| 411 |
r = drand48(); |
| 412 |
|
| 413 |
=item C<endutxent> |
| 414 |
|
| 415 |
endutxent(); |
| 416 |
|
| 417 |
=item C<dup3> |
| 418 |
|
| 419 |
newfd = dup3(oldfd, newfd, flags); |
| 420 |
|
| 421 |
C<dup3()> is similar to L<C<POSIX::dup2()>|POSIX/dup2> except for the |
| 422 |
following differences. |
| 423 |
|
| 424 |
I<oldfd> and I<newfd> may be numeric file descriptors or Perl file handles. If |
| 425 |
I<oldfd> equals I<newfd>, then C<dup3()> fails with the error C<EINVAL>. |
| 426 |
|
| 427 |
The I<flags> parameter forces the file descriptor flags of I<newfd> to be the |
| 428 |
bitwise OR of zero or more of C<O_CLOEXEC>, C<O_CLOFORK>. Your system might |
| 429 |
support a different set of flags. |
| 430 |
|
| 431 |
C<dup3()> returns the new numeric file descriptor (which may be 0). |
| 432 |
|
| 433 |
On error, undef is returned. |
| 434 |
|
| 435 |
C<dup3()> was standardized with POSIX.1-2024. |
| 436 |
|
| 437 |
I<New in version 0.29.> |
| 438 |
|
| 439 |
=item C<erand48> |
| 440 |
|
| 441 |
(r, X0, X1, X2) = erand48(X0, X1, X2); |
| 442 |
|
| 443 |
=item C<erf> |
| 444 |
|
| 445 |
y = erf(x); |
| 446 |
|
| 447 |
=item C<erfc> |
| 448 |
|
| 449 |
y = erfc(x); |
| 450 |
|
| 451 |
=item C<execveat> |
| 452 |
|
| 453 |
rv = execveat(dirfd, path, args, env=undef, flags=0); |
| 454 |
|
| 455 |
The C<execveat()> system call is a nonstandard extension present in Linux. |
| 456 |
See also L<C<fexecve()>|"fexecve">. |
| 457 |
|
| 458 |
It executes the program referred to by I<path>, which is interpreted relative |
| 459 |
to I<dirfd> as with the other I<*at> functions, passing I<args> as its |
| 460 |
command-line arguments and optionally I<env> as its environment. |
| 461 |
|
| 462 |
I<args> must be an array reference and, by convention, I<args-E<gt>[0]> should |
| 463 |
be the name of the program being executed. |
| 464 |
|
| 465 |
I<env> must be a hash reference. If omitted or undef, the environment of the |
| 466 |
calling proces is used (which you can manipulate via C<%ENV>). |
| 467 |
|
| 468 |
I<flags> is a bit mask that can include zero or more of the flags |
| 469 |
C<AT_EMPTY_PATH>, C<AT_SYMLINK_NOFOLLOW>. |
| 470 |
|
| 471 |
I<path> is executed "as is", i.e. no C<PATH> search or interpretation of shell |
| 472 |
metacharacters takes place as opposed to Perl's built-in |
| 473 |
L<C<exec>|perlfunc/exec>. |
| 474 |
|
| 475 |
Returns undef on error, otherwise it doesn't return. |
| 476 |
|
| 477 |
Usage example: |
| 478 |
|
| 479 |
sysopen my $dh, '/usr', O_DIRECTORY|O_PATH; |
| 480 |
execveat($dh, 'bin/date', [qw(date +%T)], {TZ => 'UTC'}, AT_SYMLINK_NOFOLLOW); |
| 481 |
|
| 482 |
I<New in version 0.22.> |
| 483 |
|
| 484 |
=item C<exp> |
| 485 |
|
| 486 |
y = exp(x); |
| 487 |
|
| 488 |
=item C<exp2> |
| 489 |
|
| 490 |
y = exp2(x); |
| 491 |
|
| 492 |
This function may not be available in libquadmath. |
| 493 |
|
| 494 |
=item C<expm1> |
| 495 |
|
| 496 |
y = expm1(x); |
| 497 |
|
| 498 |
=item C<fabs> |
| 499 |
|
| 500 |
absval = fabs(x); |
| 501 |
|
| 502 |
I<New in version 0.27.> |
| 503 |
|
| 504 |
=item C<faccessat> |
| 505 |
|
| 506 |
rv = faccessat(dirfd, path, amode, flags=0); |
| 507 |
|
| 508 |
I<flags> is the bitwise OR of zero or more of C<AT_EACCESS>, |
| 509 |
C<AT_SYMLINK_NOFOLLOW>. |
| 510 |
|
| 511 |
=item C<fchmodat> |
| 512 |
|
| 513 |
rv = fchmodat(dirfd, path, mode, flags=0); |
| 514 |
|
| 515 |
I<flags> can be 0 or C<AT_SYMLINK_NOFOLLOW>. Your system might support a |
| 516 |
different set of flags. |
| 517 |
|
| 518 |
=item C<fchownat> |
| 519 |
|
| 520 |
rv = fchownat(dirfd, path, uid, gid, flags=0); |
| 521 |
|
| 522 |
I<flags> can be 0 or C<AT_SYMLINK_NOFOLLOW>. Your system might support a |
| 523 |
different set of flags. |
| 524 |
|
| 525 |
=item C<fdatasync> |
| 526 |
|
| 527 |
rv = fdatasync(fd); |
| 528 |
|
| 529 |
=item C<fdopen> |
| 530 |
|
| 531 |
rv = fdopen(fd, mode); |
| 532 |
|
| 533 |
Returns a file handle associated with the numeric file descriptor I<fd> or |
| 534 |
undef on error. I<mode> is one of the values C<"r">, C<"w">, C<"a"> with an |
| 535 |
optional C<"+"> and/or C<"b">. |
| 536 |
|
| 537 |
The file descriptor is not dup'ed and will be closed when the handle is closed. |
| 538 |
|
| 539 |
It's similar to C<IO::Handle::new_from_fd()> with the following improvements: |
| 540 |
|
| 541 |
=over |
| 542 |
|
| 543 |
=item * |
| 544 |
It I<really> calls C<fdopen(3)>. |
| 545 |
|
| 546 |
=item * |
| 547 |
It expects POSIX mode strings (e.g. C<"r">, not C<"<">). |
| 548 |
|
| 549 |
=item * |
| 550 |
It fails if I<mode> is not compatible with the flags of I<fd>. |
| 551 |
|
| 552 |
=back |
| 553 |
|
| 554 |
Usage example: |
| 555 |
|
| 556 |
my $fh = do { |
| 557 |
opendir my $dh, '.'; |
| 558 |
fdopen(POSIX::dup(fileno $dh), 'r'); |
| 559 |
}; |
| 560 |
chmod 0700, $fh; # this would fail with $dh from opendir |
| 561 |
|
| 562 |
I<New in version 0.05.> |
| 563 |
|
| 564 |
I<Changed in version 0.22:> I<fd> can no longer be a handle (that was a wrong |
| 565 |
turn). |
| 566 |
|
| 567 |
=item C<fdopendir> |
| 568 |
|
| 569 |
rv = fdopendir(fd); |
| 570 |
|
| 571 |
Returns a directory handle associated with the numeric file descriptor I<fd> |
| 572 |
or undef on error. |
| 573 |
|
| 574 |
The file descriptor is not dup'ed and will be closed when the handle is closed. |
| 575 |
|
| 576 |
Usage example: |
| 577 |
|
| 578 |
my $dh = do { |
| 579 |
sysopen my $fh, '/tmp', O_RDONLY|O_DIRECTORY|O_NOFOLLOW; |
| 580 |
fdopendir(POSIX::dup(fileno $fh)); |
| 581 |
}; |
| 582 |
my @dents = readdir $dh; # this would fail with $fh from sysopen |
| 583 |
|
| 584 |
I<New in version 0.05.> |
| 585 |
|
| 586 |
I<Changed in version 0.22:> I<fd> can no longer be a handle (that was a wrong |
| 587 |
turn). |
| 588 |
|
| 589 |
=item C<fdim> |
| 590 |
|
| 591 |
d = fdim(double x, double y); |
| 592 |
|
| 593 |
=item C<feclearexcept> |
| 594 |
|
| 595 |
rv = feclearexcept(excepts); |
| 596 |
|
| 597 |
Returns C<0 but true> on success, undef on error. |
| 598 |
|
| 599 |
I<New in version 0.20.> |
| 600 |
|
| 601 |
=item C<fegetround> |
| 602 |
|
| 603 |
rounding_mode = fegetround(); |
| 604 |
|
| 605 |
=item C<feraiseexcept> |
| 606 |
|
| 607 |
rv = feraiseexcept(excepts); |
| 608 |
|
| 609 |
Returns C<0 but true> on success, undef on error. |
| 610 |
|
| 611 |
I<New in version 0.20.> |
| 612 |
|
| 613 |
=item C<fesetround> |
| 614 |
|
| 615 |
rv = fesetround(round); |
| 616 |
|
| 617 |
Returns C<0 but true> on success, undef on error. |
| 618 |
|
| 619 |
=item C<fetestexcept> |
| 620 |
|
| 621 |
excepts_currently_set = fetestexcept(excepts); |
| 622 |
|
| 623 |
I<New in version 0.20.> |
| 624 |
|
| 625 |
=item C<fexecve> |
| 626 |
|
| 627 |
rv = fexecve(fd, args, env=undef); |
| 628 |
|
| 629 |
Executes the program referred to by the file descriptor I<fd>, passing I<args> |
| 630 |
as its command-line arguments and optionally I<env> as its environment. |
| 631 |
|
| 632 |
I<args> must be an array reference and, by convention, I<args-E<gt>[0]> should |
| 633 |
be the name of the program being executed. |
| 634 |
|
| 635 |
I<env> must be a hash reference. If omitted or undef, the environment of the |
| 636 |
calling proces is used (which you can manipulate via C<%ENV>). |
| 637 |
|
| 638 |
See the manpage for issues regarding the close-on-exec flag and the /proc |
| 639 |
filesystem. |
| 640 |
|
| 641 |
Returns undef on error, otherwise it doesn't return. |
| 642 |
|
| 643 |
Usage example: |
| 644 |
|
| 645 |
sysopen my $fh, '/usr/bin/date', O_PATH; |
| 646 |
fexecve($fh, [qw(date +%T)], {TZ => 'UTC'}); |
| 647 |
|
| 648 |
See also L<C<execveat()>|"execveat">. |
| 649 |
|
| 650 |
I<New in version 0.22.> |
| 651 |
|
| 652 |
=item C<ffs> |
| 653 |
|
| 654 |
pos = ffs(i); |
| 655 |
|
| 656 |
Calls C<ffsll()>, C<ffsl()>, or C<ffs()>, whichever is the maximum available |
| 657 |
on your system. |
| 658 |
|
| 659 |
=item C<floor> |
| 660 |
|
| 661 |
y = floor(x); |
| 662 |
|
| 663 |
=item C<fma> |
| 664 |
|
| 665 |
r = fma(x, y, z); |
| 666 |
|
| 667 |
=item C<fmax> |
| 668 |
|
| 669 |
m = fmax(x, y); |
| 670 |
|
| 671 |
=item C<fmin> |
| 672 |
|
| 673 |
m = fmin(x, y); |
| 674 |
|
| 675 |
=item C<fmod> |
| 676 |
|
| 677 |
m = fmod(x, y); |
| 678 |
|
| 679 |
=item C<fnmatch> |
| 680 |
|
| 681 |
rv = fnmatch(pattern, string, flags); |
| 682 |
|
| 683 |
Returns 0 if I<string> matches I<pattern>, C<FNM_NOMATCH> if there is no |
| 684 |
match, undef if there is an error. |
| 685 |
|
| 686 |
I<flags> is the bitwise OR of zero or more of C<FNM_NOESCAPE>, |
| 687 |
C<FNM_PATHNAME>, C<FNM_PERIOD>, C<FNM_FILE_NAME>, C<FNM_LEADING_DIR>, |
| 688 |
C<FNM_CASEFOLD>. |
| 689 |
|
| 690 |
=item C<fpclassify> |
| 691 |
|
| 692 |
rv = fpclassify(x); |
| 693 |
|
| 694 |
Returns one of C<FP_NAN>, C<FP_INFINITE>, C<FP_ZERO>, C<FP_SUBNORMAL>, |
| 695 |
C<FP_NORMAL>. |
| 696 |
|
| 697 |
=item C<frexp> |
| 698 |
|
| 699 |
(fraction, exponent) = frexp(x); |
| 700 |
|
| 701 |
I<New in version 0.27.> |
| 702 |
|
| 703 |
=item C<fstatat> |
| 704 |
|
| 705 |
(dev, ino, mode, nlink, uid, gid, rdev, size, atim_sec, mtim_sec, ctim_sec, |
| 706 |
blksize, blocks, atim_nsec, mtim_nsec, ctim_nsec) = |
| 707 |
fstatat(dirfd, path, flags = 0); |
| 708 |
|
| 709 |
I<flags> is the bitwise OR of zero or more of C<AT_SYMLINK_NOFOLLOW>, |
| 710 |
C<AT_NO_AUTOMOUNT>. Your system might support a different set of flags. |
| 711 |
|
| 712 |
See L<C<stat()>|"stat"> for notes on the return values and bugs in |
| 713 |
C<CORE::stat()>. |
| 714 |
|
| 715 |
In list context, it returns the above list on success or the empty list on |
| 716 |
error. In scalar context, it returns a (non-undef) boolean value indicating |
| 717 |
success or failure. |
| 718 |
|
| 719 |
=item C<fsync> |
| 720 |
|
| 721 |
rv = fsync(fd); |
| 722 |
|
| 723 |
=item C<futimens> |
| 724 |
|
| 725 |
rv = futimens(fd, atime_sec, atime_nsec, mtime_sec, mtime_nsec); |
| 726 |
|
| 727 |
I<atime_sec> and I<mtime_sec> default to 0, I<atime_nsec> and I<mtime_nsec> |
| 728 |
default to C<UTIME_NOW>. |
| 729 |
|
| 730 |
=item C<getdate> |
| 731 |
|
| 732 |
(sec, min, hour, mday, mon, year, wday, yday, isdst) = getdate(string); |
| 733 |
|
| 734 |
=item C<getdate_err> |
| 735 |
|
| 736 |
C<getdate_err()> returns the value of the getdate_err variable. |
| 737 |
|
| 738 |
=item C<getegid> |
| 739 |
|
| 740 |
egid = getegid(); |
| 741 |
|
| 742 |
=item C<getentropy> |
| 743 |
|
| 744 |
s = getentropy(length); |
| 745 |
|
| 746 |
Returns a string of I<length> bytes of "unpredictable high-quality random |
| 747 |
data, generated by a cryptographically secure pseudo-random number generator", |
| 748 |
or undef on error. |
| 749 |
|
| 750 |
The maximum permitted value for I<length> is C<GETENTROPY_MAX> (usually 256). |
| 751 |
If more bytes are requested, C<$!> is set to C<EINVAL> as decreed by POSIX, |
| 752 |
even on systems that believe C<EIO> is right. |
| 753 |
|
| 754 |
If your system does not provide C<getentropy()>, it is emulated via |
| 755 |
C<getrandom()>, C<arc4random_buf()>, C<BCryptGenRandom()> (Windows), C<RDRAND> |
| 756 |
(Intel/AMD), C<RNDR> (ARM64), or C<DARN> (Power9) if available (picked in this |
| 757 |
order at build time). |
| 758 |
|
| 759 |
C<getentropy()> was standardized with POSIX.1-2024. |
| 760 |
|
| 761 |
I<New in version 0.27.> |
| 762 |
|
| 763 |
I<Changed in version 0.29:> Added DARN as a fallback on Power9. |
| 764 |
|
| 765 |
=item C<geteuid> |
| 766 |
|
| 767 |
euid = geteuid(); |
| 768 |
|
| 769 |
=item C<getgid> |
| 770 |
|
| 771 |
gid = getgid(); |
| 772 |
|
| 773 |
=item C<gethostid> |
| 774 |
|
| 775 |
hostid = gethostid(); |
| 776 |
|
| 777 |
=item C<gethostname> |
| 778 |
|
| 779 |
hostname = gethostname(); |
| 780 |
|
| 781 |
=item C<getitimer> |
| 782 |
|
| 783 |
(int_sec, int_usec, val_sec, val_usec) = getitimer(which); |
| 784 |
|
| 785 |
I<which> can be one of C<ITIMER_REAL>, C<ITIMER_VIRTUAL>, C<ITIMER_PROF>. |
| 786 |
|
| 787 |
POSIX.1-2008 marks C<getitimer()> and C<setitimer()> obsolete, recommending |
| 788 |
the use of the POSIX timers API (L<C<timer_gettime()>|"timer_gettime">, |
| 789 |
L<C<timer_settime()>|"timer_settime">, etc.) instead. |
| 790 |
|
| 791 |
POSIX.1-2024 removed C<getitimer()> and C<setitimer()>. |
| 792 |
|
| 793 |
=item C<getpriority> |
| 794 |
|
| 795 |
prio = getpriority(which=PRIO_PROCESS, who=0); |
| 796 |
|
| 797 |
I<which> can be one of C<PRIO_PROCESS>, C<PRIO_PGRP>, C<PRIO_USER>, defaults |
| 798 |
to C<PRIO_PROCESS>. I<who> defaults to 0. |
| 799 |
|
| 800 |
Returns undef on error. |
| 801 |
|
| 802 |
=item C<getresgid> |
| 803 |
|
| 804 |
(rgid, egid, sgid) = getresgid(); |
| 805 |
|
| 806 |
Returns the empty list on error. |
| 807 |
|
| 808 |
C<getresgid()> was standardized with POSIX.1-2024. |
| 809 |
|
| 810 |
I<New in version 0.27.> |
| 811 |
|
| 812 |
=item C<getresuid> |
| 813 |
|
| 814 |
(ruid, euid, suid) = getresuid(); |
| 815 |
|
| 816 |
Returns the empty list on error. |
| 817 |
|
| 818 |
C<getresuid()> was standardized with POSIX.1-2024. |
| 819 |
|
| 820 |
I<New in version 0.27.> |
| 821 |
|
| 822 |
=item C<getsid> |
| 823 |
|
| 824 |
sid = getsid(pid); |
| 825 |
|
| 826 |
I<pid> defaults to 0. |
| 827 |
|
| 828 |
=item C<getuid> |
| 829 |
|
| 830 |
uid = getuid(); |
| 831 |
|
| 832 |
=item C<getutxent> |
| 833 |
|
| 834 |
(user, id, line, pid, type, sec, usec) = getutxent(); |
| 835 |
|
| 836 |
C<getutxent()> reads a line from the current file position in the utmp file. |
| 837 |
|
| 838 |
=item C<getutxid> |
| 839 |
|
| 840 |
(user, id, line, pid, type, sec, usec) = getutxid(ut_type[, ut_id]); |
| 841 |
|
| 842 |
C<getutxid()> searches forward from the current file position in the utmp file |
| 843 |
based upon I<ut_type> and I<ut_id>. If I<ut_type> is one of C<RUN_LVL>, |
| 844 |
C<BOOT_TIME>, C<NEW_TIME>, or C<OLD_TIME>, C<getutxid()> will find the first |
| 845 |
entry whose I<ut_type> field matches I<ut_type>. If I<ut_type> is one of |
| 846 |
C<INIT_PROCESS>, C<LOGIN_PROCESS>, C<USER_PROCESS>, or C<DEAD_PROCESS>, |
| 847 |
C<getutxid()> will find the first entry whose I<ut_id> field matches I<ut_id>. |
| 848 |
|
| 849 |
Returns the empty list on error. |
| 850 |
|
| 851 |
=item C<getutxline> |
| 852 |
|
| 853 |
(user, id, line, pid, type, sec, usec) = getutxline(ut_line); |
| 854 |
|
| 855 |
C<getutxline()> searches forward from the current file position in the utmp |
| 856 |
file. It scans entries whose I<ut_type> is C<USER_PROCESS> or C<LOGIN_PROCESS> |
| 857 |
and returns the first one whose I<ut_line> field matches I<ut_line>. |
| 858 |
|
| 859 |
Returns the empty list on error. |
| 860 |
|
| 861 |
=item C<grantpt> |
| 862 |
|
| 863 |
rv = grantpt(fd); |
| 864 |
|
| 865 |
I<New in version 0.27.> |
| 866 |
|
| 867 |
=item C<hypot> |
| 868 |
|
| 869 |
r = hypot(x, y); |
| 870 |
|
| 871 |
=item C<ilogb> |
| 872 |
|
| 873 |
y = ilogb(x); |
| 874 |
|
| 875 |
=item C<isalnum> |
| 876 |
|
| 877 |
rv = isalnum(charstring); |
| 878 |
|
| 879 |
Like POSIX::isalnum() but returns 0 for the empty string. |
| 880 |
|
| 881 |
=item C<isalpha> |
| 882 |
|
| 883 |
rv = isalpha(charstring); |
| 884 |
|
| 885 |
Like POSIX::isalpha() but returns 0 for the empty string. |
| 886 |
|
| 887 |
=item C<isascii> |
| 888 |
|
| 889 |
rv = isascii(charstring); |
| 890 |
|
| 891 |
POSIX.1-2008 marks it as obsolete and it was removed in POSIX.1-2024, but I |
| 892 |
include it anyway. |
| 893 |
|
| 894 |
I<New in version 0.19.> |
| 895 |
|
| 896 |
=item C<isatty> |
| 897 |
|
| 898 |
rv = isatty(fd); |
| 899 |
|
| 900 |
=item C<isblank> |
| 901 |
|
| 902 |
rv = isblank(charstring); |
| 903 |
|
| 904 |
Like POSIX::isblank() but returns 0 for the empty string. |
| 905 |
|
| 906 |
=item C<iscntrl> |
| 907 |
|
| 908 |
rv = iscntrl(charstring); |
| 909 |
|
| 910 |
Like POSIX::iscntrl() but returns 0 for the empty string. |
| 911 |
|
| 912 |
=item C<isdigit> |
| 913 |
|
| 914 |
rv = isdigit(charstring); |
| 915 |
|
| 916 |
Like POSIX::isdigit() but returns 0 for the empty string. |
| 917 |
|
| 918 |
=item C<isfinite> |
| 919 |
|
| 920 |
rv = isfinite(x); |
| 921 |
|
| 922 |
=item C<isgraph> |
| 923 |
|
| 924 |
rv = isgraph(charstring); |
| 925 |
|
| 926 |
Like POSIX::isgraph() but returns 0 for the empty string. |
| 927 |
|
| 928 |
=item C<isgreaterequal> |
| 929 |
|
| 930 |
rv = isgreaterequal(x, y); |
| 931 |
|
| 932 |
I<New in version 0.20.> |
| 933 |
|
| 934 |
=item C<isinf> |
| 935 |
|
| 936 |
rv = isinf(x); |
| 937 |
|
| 938 |
=item C<isless> |
| 939 |
|
| 940 |
rv = isless(x, y); |
| 941 |
|
| 942 |
I<New in version 0.20.> |
| 943 |
|
| 944 |
=item C<islessequal> |
| 945 |
|
| 946 |
rv = islessequal(x, y); |
| 947 |
|
| 948 |
I<New in version 0.20.> |
| 949 |
|
| 950 |
=item C<islessgreater> |
| 951 |
|
| 952 |
rv = islessgreater(x, y); |
| 953 |
|
| 954 |
I<New in version 0.20.> |
| 955 |
|
| 956 |
=item C<islower> |
| 957 |
|
| 958 |
rv = islower(charstring); |
| 959 |
|
| 960 |
Like POSIX::islower() but returns 0 for the empty string. |
| 961 |
|
| 962 |
=item C<isnan> |
| 963 |
|
| 964 |
rv = isnan(x); |
| 965 |
|
| 966 |
=item C<isnormal> |
| 967 |
|
| 968 |
rv = isnormal(x); |
| 969 |
|
| 970 |
=item C<isprint> |
| 971 |
|
| 972 |
rv = isprint(charstring); |
| 973 |
|
| 974 |
Like POSIX::isprint() but returns 0 for the empty string. |
| 975 |
|
| 976 |
=item C<ispunct> |
| 977 |
|
| 978 |
rv = ispunct(charstring); |
| 979 |
|
| 980 |
Like POSIX::ispunct() but returns 0 for the empty string. |
| 981 |
|
| 982 |
=item C<isspace> |
| 983 |
|
| 984 |
rv = isspace(charstring); |
| 985 |
|
| 986 |
Like POSIX::isspace() but returns 0 for the empty string. |
| 987 |
|
| 988 |
=item C<isunordered> |
| 989 |
|
| 990 |
rv = isunordered(x, y); |
| 991 |
|
| 992 |
I<New in version 0.20.> |
| 993 |
|
| 994 |
=item C<isupper> |
| 995 |
|
| 996 |
rv = isupper(charstring); |
| 997 |
|
| 998 |
Like POSIX::isupper() but returns 0 for the empty string. |
| 999 |
|
| 1000 |
=item C<isxdigit> |
| 1001 |
|
| 1002 |
rv = isxdigit(charstring); |
| 1003 |
|
| 1004 |
Like POSIX::isxdigit() but returns 0 for the empty string. |
| 1005 |
|
| 1006 |
=item C<j0> |
| 1007 |
|
| 1008 |
y = j0(x); |
| 1009 |
|
| 1010 |
C<j0()> is the Bessel function of the first kind of order 0. |
| 1011 |
|
| 1012 |
=item C<j1> |
| 1013 |
|
| 1014 |
y = j1(x); |
| 1015 |
|
| 1016 |
C<j1()> is the Bessel function of the first kind of order 1. |
| 1017 |
|
| 1018 |
=item C<jn> |
| 1019 |
|
| 1020 |
y = jn(n, x); |
| 1021 |
|
| 1022 |
C<jn()> is the Bessel function of the first kind of order I<n>. |
| 1023 |
|
| 1024 |
=item C<jrand48> |
| 1025 |
|
| 1026 |
(r, X0, X1, X2) = jrand48(X0, X1, X2); |
| 1027 |
|
| 1028 |
=item C<killpg> |
| 1029 |
|
| 1030 |
rv = killpg(pgrp, sig); |
| 1031 |
|
| 1032 |
=item C<l64a> |
| 1033 |
|
| 1034 |
s = l64a(n); |
| 1035 |
|
| 1036 |
=item C<lchown> |
| 1037 |
|
| 1038 |
rv = lchown(path, uid, gid); |
| 1039 |
|
| 1040 |
I<New in version 0.08.> |
| 1041 |
|
| 1042 |
=item C<ldexp> |
| 1043 |
|
| 1044 |
y = ldexp(x, exp); |
| 1045 |
|
| 1046 |
=item C<lgamma> |
| 1047 |
|
| 1048 |
y = lgamma(x); |
| 1049 |
|
| 1050 |
=item C<link> |
| 1051 |
|
| 1052 |
rv = link(path1, path2); |
| 1053 |
|
| 1054 |
=item C<linkat> |
| 1055 |
|
| 1056 |
rv = linkat(fd1, path1, fd2, path2, flags=0); |
| 1057 |
|
| 1058 |
I<flags> can be 0 or C<AT_SYMLINK_FOLLOW>. Your system might support a |
| 1059 |
different set of flags. |
| 1060 |
|
| 1061 |
=item C<log> |
| 1062 |
|
| 1063 |
y = log(x); |
| 1064 |
|
| 1065 |
=item C<log10> |
| 1066 |
|
| 1067 |
y = log10(x); |
| 1068 |
|
| 1069 |
=item C<log1p> |
| 1070 |
|
| 1071 |
y = log1p(x); |
| 1072 |
|
| 1073 |
=item C<log2> |
| 1074 |
|
| 1075 |
y = log2(x); |
| 1076 |
|
| 1077 |
=item C<logb> |
| 1078 |
|
| 1079 |
y = logb(x); |
| 1080 |
|
| 1081 |
This function may not be available in libquadmath. |
| 1082 |
|
| 1083 |
=item C<lrand48> |
| 1084 |
|
| 1085 |
r = lrand48(); |
| 1086 |
|
| 1087 |
=item C<lrint> |
| 1088 |
|
| 1089 |
l = lrint(x); |
| 1090 |
|
| 1091 |
From the countless C<l*rint*()> interfaces it chooses the one matching your |
| 1092 |
Perl's NV type, preferring the "long long" return value variant. |
| 1093 |
|
| 1094 |
If the rounded value is outside Perl's internal signed integer range, it is |
| 1095 |
returned as a string. If the rounded value is too large to be stored in a long |
| 1096 |
long or long, undef is returned. |
| 1097 |
|
| 1098 |
I<New in verion 0.27.> |
| 1099 |
|
| 1100 |
=item C<lround> |
| 1101 |
|
| 1102 |
l = lround(x); |
| 1103 |
|
| 1104 |
From the countless C<l*round*()> interfaces it chooses the one matching your |
| 1105 |
Perl's NV type, preferring the "long long" return value variant. |
| 1106 |
|
| 1107 |
If the rounded value is outside Perl's internal signed integer range, it is |
| 1108 |
returned as a string. |
| 1109 |
|
| 1110 |
I<Changed in version 0.27:> No longer returns undef on error. |
| 1111 |
|
| 1112 |
=item C<lstat> |
| 1113 |
|
| 1114 |
(dev, ino, mode, nlink, uid, gid, rdev, size, atim_sec, mtim_sec, ctim_sec, |
| 1115 |
blksize, blocks, atim_nsec, mtim_nsec, ctim_nsec) = lstat(path); |
| 1116 |
|
| 1117 |
C<path> is assumed to be a string (or will be converted to a string). |
| 1118 |
|
| 1119 |
See L<C<stat()>|"stat"> for notes on the return values and bugs in |
| 1120 |
C<CORE::stat()>. |
| 1121 |
|
| 1122 |
In list context, it returns the above list on success or the empty list on |
| 1123 |
error. In scalar context, it returns a (non-undef) boolean value indicating |
| 1124 |
success or failure. |
| 1125 |
|
| 1126 |
=item C<mkdir> |
| 1127 |
|
| 1128 |
rv = mkdir(path, [mode = 0777]); |
| 1129 |
|
| 1130 |
=item C<mkdirat> |
| 1131 |
|
| 1132 |
rv = mkdirat(fd, path, mode); |
| 1133 |
|
| 1134 |
=item C<mkdtemp> |
| 1135 |
|
| 1136 |
name = mkdtemp(template); |
| 1137 |
|
| 1138 |
=item C<mkfifo> |
| 1139 |
|
| 1140 |
rv = mkfifo(path, mode); |
| 1141 |
|
| 1142 |
=item C<mkfifoat> |
| 1143 |
|
| 1144 |
rv = mkfifoat(fd, path, mode); |
| 1145 |
|
| 1146 |
=item C<mknod> |
| 1147 |
|
| 1148 |
rv = mknod(path, mode, dev); |
| 1149 |
|
| 1150 |
=item C<mknodat> |
| 1151 |
|
| 1152 |
rv = mknodat(fd, path, mode, dev); |
| 1153 |
|
| 1154 |
=item C<mkostemp> |
| 1155 |
|
| 1156 |
(fd, name) = mkostemp(template, flags); |
| 1157 |
|
| 1158 |
I<flags> is a bitwise OR of zero or more C<open()> flags. For the exact set of |
| 1159 |
supported flags and their restrictions see the manpage of your system. |
| 1160 |
|
| 1161 |
C<mkostemp()> was standardized with POSIX.1-2024. |
| 1162 |
|
| 1163 |
I<New in verion 0.27.> |
| 1164 |
|
| 1165 |
=item C<mkstemp> |
| 1166 |
|
| 1167 |
(fd, name) = mkstemp(template); |
| 1168 |
|
| 1169 |
=item C<mrand48> |
| 1170 |
|
| 1171 |
mrand48(); |
| 1172 |
|
| 1173 |
=item C<nanosleep> |
| 1174 |
|
| 1175 |
(rem_sec, rem_nsec) = nanosleep(floating_sec); |
| 1176 |
floating_rem_sec = nanosleep(floating_sec); |
| 1177 |
|
| 1178 |
(rem_sec, rem_nsec) = nanosleep(sec, nsec); |
| 1179 |
floating_rem_sec = nanosleep(sec, nsec); |
| 1180 |
|
| 1181 |
Returns zero(es) on success, the remaining time on EINTR, the empty list or |
| 1182 |
undef otherwise. |
| 1183 |
|
| 1184 |
I<Changed in version 0.25:> Sleep time can be floating seconds only or seconds |
| 1185 |
and nanoseconds. |
| 1186 |
|
| 1187 |
=item C<nearbyint> |
| 1188 |
|
| 1189 |
y = nearbyint(x); |
| 1190 |
|
| 1191 |
=item C<nextafter> |
| 1192 |
|
| 1193 |
z = nextafter(x, y); |
| 1194 |
|
| 1195 |
=item C<nexttoward> |
| 1196 |
|
| 1197 |
z = nexttoward(x, y); |
| 1198 |
|
| 1199 |
This function may not be available in libquadmath. |
| 1200 |
|
| 1201 |
=item C<nice> |
| 1202 |
|
| 1203 |
rv = nice(incr); |
| 1204 |
|
| 1205 |
Returns undef on error. |
| 1206 |
|
| 1207 |
=item C<nrand48> |
| 1208 |
|
| 1209 |
r = nrand48() |
| 1210 |
|
| 1211 |
=item C<open> |
| 1212 |
|
| 1213 |
rv = open(path, flags=O_RDONLY, mode=0666); |
| 1214 |
|
| 1215 |
=item C<openat> |
| 1216 |
|
| 1217 |
rv = openat(dirfd, path, flags=O_RDONLY, mode=0666); |
| 1218 |
|
| 1219 |
If I<dirfd> is numeric (i.e. a file descriptor), C<openat()> returns a file |
| 1220 |
descriptor. If I<dirfd> is a file or directory handle, the return value is |
| 1221 |
also a handle whose type depends on the file type of I<path>: If I<path> is a |
| 1222 |
directory, the return value is a directory handle, otherwise it's a file |
| 1223 |
handle. |
| 1224 |
|
| 1225 |
To get a handle even for the special numeric I<dirfd> value C<AT_FDCWD>, you |
| 1226 |
can pass a reference to that value instead, i.e. C<openat(\AT_FDCWD, ...)>. |
| 1227 |
|
| 1228 |
Returns undef on error. |
| 1229 |
|
| 1230 |
I<Changed in version 0.18:> Support added for C<\AT_FDCWD> reference. |
| 1231 |
|
| 1232 |
=item C<openat2> |
| 1233 |
|
| 1234 |
rv = openat2(dirfd, path, how); |
| 1235 |
|
| 1236 |
The C<openat2()> system call is a Linux-specific extension of |
| 1237 |
L<C<openat()>|"openat"> and provides a superset of its functionality. |
| 1238 |
|
| 1239 |
The I<how> parameter is a hash reference corresponding to the I<struct |
| 1240 |
open_how>. It currently supports the keys I<flags>, I<mode> and |
| 1241 |
I<resolve>. Missing keys are treated as having a zero value. |
| 1242 |
|
| 1243 |
Example: |
| 1244 |
|
| 1245 |
my $fh = openat2( |
| 1246 |
\AT_FDCWD, '/foobar', |
| 1247 |
{flags => O_RDWR|O_CREAT, mode => 0600, resolve => RESOLVE_IN_ROOT} |
| 1248 |
); |
| 1249 |
|
| 1250 |
Note that, unlike L<C<open()>|"open"> or L<C<openat()>|"openat">, C<openat2()> |
| 1251 |
is very picky about I<flags> and I<mode>. See the manpage for details. |
| 1252 |
|
| 1253 |
Returns undef on error. |
| 1254 |
|
| 1255 |
I<New in version 0.18.> |
| 1256 |
|
| 1257 |
=item C<pathconf> |
| 1258 |
|
| 1259 |
rv = pathconf(what, name); |
| 1260 |
|
| 1261 |
I<what> can be a path or, if your system supports C<fpathconf()>, a Perl file |
| 1262 |
or directory handle or a file descriptor. |
| 1263 |
|
| 1264 |
I<name> is one of the C<_PC_*> integer constants. |
| 1265 |
|
| 1266 |
Returns undef on error. |
| 1267 |
|
| 1268 |
I<New in version 0.22.> |
| 1269 |
|
| 1270 |
=item C<pause> |
| 1271 |
|
| 1272 |
rv = pause(); |
| 1273 |
|
| 1274 |
=item C<pipe2> |
| 1275 |
|
| 1276 |
(read_fd, write_fd) = pipe2(flags); |
| 1277 |
|
| 1278 |
(read_fh, write_fh) = pipe2(\flags); |
| 1279 |
|
| 1280 |
C<pipe2()> is similar to L<C<POSIX::pipe()>|POSIX/pipe> except for the |
| 1281 |
following differences. |
| 1282 |
|
| 1283 |
I<flags> is the bitwise OR of zero or more of C<O_CLOEXEC>, C<O_CLOFORK>, |
| 1284 |
C<O_NONBLOCK>. Your system might support a different set of flags. |
| 1285 |
|
| 1286 |
If I<flags> is an ordinary scalar, then two numeric file descriptors are |
| 1287 |
returned. If I<flags> is a reference to a scalar, then two Perl file handles |
| 1288 |
are returned. |
| 1289 |
|
| 1290 |
If I<flags> is 0 then C<pipe2()> is the same as C<pipe()>. |
| 1291 |
|
| 1292 |
On error, the empty list is returned. |
| 1293 |
|
| 1294 |
C<pipe2()> was standardized with POSIX.1-2024. |
| 1295 |
|
| 1296 |
I<New in version 0.29.> |
| 1297 |
|
| 1298 |
=item C<poll> |
| 1299 |
|
| 1300 |
rv = poll(pollfds, timeout=-1); |
| 1301 |
|
| 1302 |
I<timeout> specifies the number of milliseconds that C<poll()> should block |
| 1303 |
waiting for a file descriptor to become ready. A negative I<timeout> value |
| 1304 |
means an infinite timeout. A I<timeout> of zero causes C<poll()> to return |
| 1305 |
immediately. |
| 1306 |
|
| 1307 |
I<pollfds> is an array reference holding array references of the form I<[fd, |
| 1308 |
events, revents]> where I<fd> is an integer file descriptor or a file handle, |
| 1309 |
I<events> is a bit mask of events you are interested in for I<fd>, and |
| 1310 |
I<revents> is a bit mask of events that actually occurred. |
| 1311 |
|
| 1312 |
I<revents> is changed by the call (unless a timeout or error occurs), |
| 1313 |
everything else remains unchanged. |
| 1314 |
|
| 1315 |
If I<fd> is negative or anything L<C<sv_2io()>|perlapi/sv_2io> doesn't consider |
| 1316 |
a file handle, then the corresponding events field is ignored and the revents |
| 1317 |
field returns zero. |
| 1318 |
|
| 1319 |
Returns the number of elements in I<pollfds> whose I<revents> have been set to |
| 1320 |
a non-zero value, zero if the call timed out. On error, C<poll()> returns -1 |
| 1321 |
and sets C<$!> just like L<C<select()>|perlfunc/select>. |
| 1322 |
|
| 1323 |
Usage example: |
| 1324 |
|
| 1325 |
open my $pipe, '-|', qw(tail -f /var/log/messages); |
| 1326 |
my $pollfds = [[\*STDIN, POLLIN, 0], [2, POLLOUT, 0], [$pipe, POLLIN, 0]]; |
| 1327 |
my $rv = poll($pollfds, -1); |
| 1328 |
|
| 1329 |
# Skip events for fd 2 this time: |
| 1330 |
my $pollfds = [[\*STDIN, POLLIN, 0], [-2, POLLOUT, 0], [$pipe, POLLIN, 0]]; |
| 1331 |
my $rv = poll($pollfds, -1); |
| 1332 |
|
| 1333 |
I<New in version 0.25.> |
| 1334 |
|
| 1335 |
=item C<ppoll> |
| 1336 |
|
| 1337 |
rv = ppoll(pollfds[, timeout[, sigmask]]); |
| 1338 |
|
| 1339 |
C<ppoll()> is similar to L<C<poll()>|"poll"> with the following differences: |
| 1340 |
|
| 1341 |
I<timeout> can be an integer or floating point value in seconds or an array |
| 1342 |
reference of the form I<[seconds, nanoseconds]>. An omitted or undef |
| 1343 |
I<timeout> value means an infinite timeout. |
| 1344 |
|
| 1345 |
I<sigmask> must be a L<C<POSIX::SigSet>|POSIX/POSIX::SigSet>. If I<sigmask> is |
| 1346 |
omitted or undef, no signal mask is applied and C<ppoll()> behaves like |
| 1347 |
L<C<poll()>|"poll"> with a more precise timeout. |
| 1348 |
|
| 1349 |
C<ppoll()> was standardized with POSIX.1-2024. |
| 1350 |
|
| 1351 |
I<New in version 0.27.> |
| 1352 |
|
| 1353 |
=item C<posix_fadvise> |
| 1354 |
|
| 1355 |
rv = posix_fadvise(fd, offset, len, advice); |
| 1356 |
|
| 1357 |
I<advice> is one of the C<POSIX_FADV_> constants. |
| 1358 |
|
| 1359 |
I<New in version 0.14.> |
| 1360 |
|
| 1361 |
=item C<posix_fallocate> |
| 1362 |
|
| 1363 |
rv = posix_fallocate(fd, offset, len); |
| 1364 |
|
| 1365 |
I<New in version 0.14.> |
| 1366 |
|
| 1367 |
=item C<posix_openpt> |
| 1368 |
|
| 1369 |
fh = posix_openpt(flags=O_RDWR); |
| 1370 |
|
| 1371 |
I<flags> is the bitwise OR of zero or more of C<O_RDWR>, C<O_NOCTTY>, |
| 1372 |
C<O_CLOEXEC>, C<O_CLOFORK>. |
| 1373 |
|
| 1374 |
C<O_CLOEXEC>, C<O_CLOFORK> were standardized with POSIX.1-2024. |
| 1375 |
|
| 1376 |
I<New in version 0.27.> |
| 1377 |
|
| 1378 |
=item C<pow> |
| 1379 |
|
| 1380 |
r = pow(x, y); |
| 1381 |
|
| 1382 |
I<New in version 0.27.> |
| 1383 |
|
| 1384 |
=item C<pread> |
| 1385 |
|
| 1386 |
bytes_read = pread(fd, buf, count, offset=0, buf_offset=0); |
| 1387 |
|
| 1388 |
C<pread()> reads I<count> bytes (not characters) of data from the file |
| 1389 |
descriptor I<fd> at file offset I<offset> into the scalar I<buf> without |
| 1390 |
changing the file offset. I<buf> will be enlarged automatically if necessary. |
| 1391 |
|
| 1392 |
I<offset> and I<buf_offset> are set to 0 if omitted or undef. |
| 1393 |
|
| 1394 |
C<pread()> treats I<buf> just like C<sysread()> does: I<buf_offset> may be |
| 1395 |
specified to place the read data at that position in I<buf>. If I<buf_offset> |
| 1396 |
is past the end of I<buf>, I<buf> will be padded with zeros before appending |
| 1397 |
the data. If I<buf_offset> is negative, it is counted from the end of the |
| 1398 |
string. I<buf> will be grown or shrunk so that the last byte actually read is |
| 1399 |
the last byte of I<buf> after the read. |
| 1400 |
|
| 1401 |
Returns the number of bytes read, 0 at EOF, undef on error. |
| 1402 |
|
| 1403 |
Croaks if I<buf> is read-only and I<count> is non-zero. |
| 1404 |
|
| 1405 |
I<Changed in version 0.13:> Argument order is now (count, offset) instead of |
| 1406 |
(offset, count). |
| 1407 |
|
| 1408 |
I<Changed in version 0.22:> Croak with read-only I<buf> and non-zero I<count>. |
| 1409 |
|
| 1410 |
=item C<preadv> |
| 1411 |
|
| 1412 |
bytes_read = preadv(fd, buffers, sizes, offset=0); |
| 1413 |
|
| 1414 |
C<preadv()> behaves like L<C<readv()>|"readv"> but adds an optional I<offset> |
| 1415 |
argument, which specifies the file position at which the data is to be |
| 1416 |
read. I<offset> is set to 0 if omitted or undef. |
| 1417 |
|
| 1418 |
The file offset is not changed by this system call. The file referred to by |
| 1419 |
I<fd> must be capable of seeking. |
| 1420 |
|
| 1421 |
This syscall is present in Linux and BSD. |
| 1422 |
|
| 1423 |
I<New in version 0.13.> |
| 1424 |
|
| 1425 |
=item C<preadv2> |
| 1426 |
|
| 1427 |
bytes_read = preadv2(fd, buffers, sizes, offset=0, flags=0); |
| 1428 |
|
| 1429 |
C<preadv2()> is similar to L<C<preadv()>|"preadv"> but adds an optional |
| 1430 |
I<flags> argument, which is a bitwise OR of zero or more of the C<RWF_*> flags |
| 1431 |
(see the manpage for details). I<flags> is set to 0 if omitted or undef. |
| 1432 |
|
| 1433 |
Unlike C<preadv()>, if the I<offset> argument is -1, then the current file |
| 1434 |
offset is used and updated. |
| 1435 |
|
| 1436 |
This syscall is Linux-specific. |
| 1437 |
|
| 1438 |
I<New in version 0.20.> |
| 1439 |
|
| 1440 |
=item C<psignal> |
| 1441 |
|
| 1442 |
psignal(sig, msg); |
| 1443 |
|
| 1444 |
I<New in version 0.25.> |
| 1445 |
|
| 1446 |
=item C<ptsname> |
| 1447 |
|
| 1448 |
name = ptsname(fd); |
| 1449 |
|
| 1450 |
I<Changed in version 0.19:> Calls C<ptsname_r()> if available. |
| 1451 |
|
| 1452 |
I<Changed in version 0.22:> I<fd> may also be a file handle. |
| 1453 |
|
| 1454 |
=item C<pwrite> |
| 1455 |
|
| 1456 |
bytes_written = pwrite(fd, buf, count=undef, offset=0, buf_offset=0); |
| 1457 |
|
| 1458 |
C<pwrite()> writes I<count> bytes of data from the scalar I<buf> to the file |
| 1459 |
descriptor I<fd> at file offset I<offset> without changing the file |
| 1460 |
offset. The file referenced by I<fd> must be capable of seeking. |
| 1461 |
|
| 1462 |
If I<count> is omitted or undef, everything from I<buf_offset> up to the end |
| 1463 |
of I<buf> is written. |
| 1464 |
|
| 1465 |
I<buf_offset> may be specified to write data from that position in |
| 1466 |
I<buf>. If I<buf_offset> is negative it is counted from the end |
| 1467 |
of the string. |
| 1468 |
|
| 1469 |
I<offset> and I<buf_offset> are set to 0 if omitted or undef. |
| 1470 |
|
| 1471 |
Returns the number of bytes written, undef on error. |
| 1472 |
|
| 1473 |
On Linux, if a file is opened with C<O_APPEND>, C<pwrite()> appends data to |
| 1474 |
the end of the file, regardless of the value of I<offset> (in violation of |
| 1475 |
POSIX). |
| 1476 |
|
| 1477 |
I<Changed in version 0.13:> Argument order is now (count, offset) instead of |
| 1478 |
(offset, count). |
| 1479 |
|
| 1480 |
=item C<pwritev> |
| 1481 |
|
| 1482 |
bytes_written = pwritev(fd, buffers, offset=0); |
| 1483 |
|
| 1484 |
C<pwritev()> behaves like L<C<writev()>|"writev"> but adds an optional |
| 1485 |
I<offset> argument, which specifies the file position at which the data is to |
| 1486 |
be written. I<offset> is set to 0 if omitted or undef. |
| 1487 |
|
| 1488 |
The file offset is not changed by this system call. The file referred to by |
| 1489 |
I<fd> must be capable of seeking. |
| 1490 |
|
| 1491 |
On Linux, if a file is opened with C<O_APPEND>, C<pwritev()> appends data to |
| 1492 |
the end of the file, regardless of the value of I<offset> (in violation of |
| 1493 |
POSIX). |
| 1494 |
|
| 1495 |
This syscall is present in Linux and BSD. |
| 1496 |
|
| 1497 |
I<New in version 0.08.> |
| 1498 |
|
| 1499 |
=item C<pwritev2> |
| 1500 |
|
| 1501 |
bytes_written = pwritev2(fd, buffers, offset=0, flags=0); |
| 1502 |
|
| 1503 |
C<pwritev2()> is similar to L<C<pwritev()>|"pwritev"> but adds an optional |
| 1504 |
I<flags> argument, which is a bitwise OR of zero or more of the C<RWF_*> |
| 1505 |
flags (see the manpage for details). I<flags> is set to 0 if omitted or undef. |
| 1506 |
|
| 1507 |
Unlike C<pwritev()>, if the I<offset> argument is -1, then the current file |
| 1508 |
offset is used and updated. |
| 1509 |
|
| 1510 |
This syscall is Linux-specific. |
| 1511 |
|
| 1512 |
I<New in version 0.20.> |
| 1513 |
|
| 1514 |
=item C<random> |
| 1515 |
|
| 1516 |
r = random(); |
| 1517 |
|
| 1518 |
=item C<raise> |
| 1519 |
|
| 1520 |
rv = raise(sig); |
| 1521 |
|
| 1522 |
=item C<read> |
| 1523 |
|
| 1524 |
bytes_read = read(fd, buf, count); |
| 1525 |
|
| 1526 |
Like C<POSIX::read()> but returns 0 at EOF instead of C<0 but true>. Croaks if |
| 1527 |
I<buf> is read-only and I<count> is non-zero. |
| 1528 |
|
| 1529 |
I<Changed in version 0.22:> Croak with read-only I<buf> and non-zero I<count>. |
| 1530 |
|
| 1531 |
=item C<readv> |
| 1532 |
|
| 1533 |
bytes_read = readv(fd, buffers, sizes); |
| 1534 |
|
| 1535 |
C<readv()> reads from the file descriptor I<fd> into I<buffers> as many |
| 1536 |
strings as there are elements in I<sizes>. |
| 1537 |
|
| 1538 |
I<buffers> must be a I<variable> holding an array (C<@buf>), an array reference |
| 1539 |
or undef (C<$buf>). If it is undef it will be upgraded to an array reference. |
| 1540 |
|
| 1541 |
I<sizes> must be an array reference, i.e. C<\@sizes>, C<$sizes>, or C<[...]>. |
| 1542 |
|
| 1543 |
I<sizes> is expected to hold unsigned integers that specify how many bytes are |
| 1544 |
to be read into each buffer. A byte count of 0 or undef creates an empty |
| 1545 |
string. I<sizes> is processed in array order. |
| 1546 |
|
| 1547 |
I<buffers> will be extended if necessary, but it will never be shrunk. If |
| 1548 |
I<buffers> is not empty, any existing elements are replaced as long as |
| 1549 |
sufficient data was read from I<fd>. |
| 1550 |
|
| 1551 |
C<readv()> returns the number of bytes read, undef on error. |
| 1552 |
|
| 1553 |
Note that it is not an error for a successful call to transfer fewer bytes |
| 1554 |
than requested. In this case there may be one "partially" filled buffer, i.e. |
| 1555 |
it contains fewer bytes than the corresponding size. Surplus size entries lead |
| 1556 |
to corresponding empty buffers. |
| 1557 |
|
| 1558 |
Usage example: |
| 1559 |
|
| 1560 |
my $fh = openat(\AT_FDCWD, '/tmp/foobar', O_RDWR|O_CREAT|O_TRUNC); |
| 1561 |
pwrite($fh, 'foobar', 6, 0); |
| 1562 |
readv($fh, my $buf1, [3, 0, 8]); # $buf1: ['foo', '', 'bar'] |
| 1563 |
sysseek $fh, 0, 0; |
| 1564 |
readv($fh, my @buf2, [1, 3, 2]); # @buf2: ('f', 'oob', 'ar') |
| 1565 |
|
| 1566 |
I<New in version 0.13.> |
| 1567 |
|
| 1568 |
I<Changed in version 0.22:> I<buffers> may be an undef variable, buffers |
| 1569 |
beyond EOF are created as empty strings instead of being skipped. |
| 1570 |
|
| 1571 |
=item C<readlink> |
| 1572 |
|
| 1573 |
name = readlink(path); |
| 1574 |
|
| 1575 |
Returns undef on error. |
| 1576 |
|
| 1577 |
=item C<readlinkat> |
| 1578 |
|
| 1579 |
name = readlinkat(dirfd, path); |
| 1580 |
|
| 1581 |
Returns undef on error. |
| 1582 |
|
| 1583 |
=item C<realpath> |
| 1584 |
|
| 1585 |
resolved_path = realpath(path); |
| 1586 |
|
| 1587 |
Calls the actual C library fuction C<realpath()> and relies on it to be able |
| 1588 |
to allocate memory for the resolved path automatically (as required by |
| 1589 |
POSIX-2008). |
| 1590 |
|
| 1591 |
Returns undef on error. |
| 1592 |
|
| 1593 |
I<New in version 0.18.> |
| 1594 |
|
| 1595 |
=item C<remainder> |
| 1596 |
|
| 1597 |
rem = remainder(x, y); |
| 1598 |
|
| 1599 |
I<Changed in version 0.27:> No longer returns undef on error. |
| 1600 |
|
| 1601 |
=item C<remove> |
| 1602 |
|
| 1603 |
rv = remove(path); |
| 1604 |
|
| 1605 |
Calls the actual C library function C<remove()>. |
| 1606 |
|
| 1607 |
Note that core C<POSIX::remove()> fails if I<path> is a symlink to a directory |
| 1608 |
because someone "couldn't read the plans right and did a piss-poor job of |
| 1609 |
putting it together" as C<(-d $_[0]) ? CORE::rmdir($_[0]) : |
| 1610 |
CORE::unlink($_[0])>. Quote from Armageddon. |
| 1611 |
|
| 1612 |
This could be fixed like this: C<unlink $_[0] or ($!{EISDIR} or $!{EPERM}) and |
| 1613 |
rmdir $_[0]> (correct errno check depends on OS), or by using the library call |
| 1614 |
right away. |
| 1615 |
|
| 1616 |
=item C<removeat> |
| 1617 |
|
| 1618 |
rv = removeat(dirfd, path); |
| 1619 |
|
| 1620 |
The C<removeat()> function works exactly like L<C<remove()>|"remove"> but |
| 1621 |
I<path> is interpreted relative to I<dirfd> as with the other I<*at> |
| 1622 |
functions. |
| 1623 |
|
| 1624 |
This function is a home-grown non-standard extension only available in this |
| 1625 |
module (to my knowledge). |
| 1626 |
|
| 1627 |
I<New in version 0.22.> |
| 1628 |
|
| 1629 |
=item C<remquo> |
| 1630 |
|
| 1631 |
(rem, quo) = remquo(x, y); |
| 1632 |
|
| 1633 |
I<New in version 0.20.> |
| 1634 |
|
| 1635 |
I<Changed in version 0.27:> No longer returns the empty list on error. |
| 1636 |
|
| 1637 |
=item C<rename> |
| 1638 |
|
| 1639 |
rv = rename(old, new); |
| 1640 |
|
| 1641 |
=item C<renameat> |
| 1642 |
|
| 1643 |
rv = renameat(olddirfd, oldpath, newdirfd, newpath); |
| 1644 |
|
| 1645 |
=item C<renameat2> |
| 1646 |
|
| 1647 |
rv = renameat(olddirfd, oldpath, newdirfd, newpath, flags=0); |
| 1648 |
|
| 1649 |
The C<renameat2()> system call is a Linux-specific extension of |
| 1650 |
L<C<renameat()>|"renameat"> and provides a superset of its functionality. |
| 1651 |
|
| 1652 |
I<flags> is the bitwise OR of zero or more of C<RENAME_EXCHANGE>, |
| 1653 |
C<RENAME_NOREPLACE>, C<RENAME_WHITEOUT>. |
| 1654 |
|
| 1655 |
I<New in version 0.21.> |
| 1656 |
|
| 1657 |
=item C<rint> |
| 1658 |
|
| 1659 |
r = rint(x); |
| 1660 |
|
| 1661 |
I<New in version 0.27.> |
| 1662 |
|
| 1663 |
=item C<rmdir> |
| 1664 |
|
| 1665 |
rv = rmdir(path); |
| 1666 |
|
| 1667 |
I<New in version 0.19.> |
| 1668 |
|
| 1669 |
=item C<round> |
| 1670 |
|
| 1671 |
r = round(x); |
| 1672 |
|
| 1673 |
=item C<scalbn> |
| 1674 |
|
| 1675 |
y = scalbn(x, exp); |
| 1676 |
|
| 1677 |
From the countless C<scalb*n*()> interfaces it chooses the one matching your |
| 1678 |
Perl's NV type, preferring the long int exp variant. |
| 1679 |
|
| 1680 |
=item C<seed48> |
| 1681 |
|
| 1682 |
(old_seed1, old_seed2, old_seed3) = seed48(seed1, seed2, seed3); |
| 1683 |
|
| 1684 |
=item C<setegid> |
| 1685 |
|
| 1686 |
rv = setegid(gid); |
| 1687 |
|
| 1688 |
=item C<seteuid> |
| 1689 |
|
| 1690 |
rv = seteuid(uid); |
| 1691 |
|
| 1692 |
=item C<setgid> |
| 1693 |
|
| 1694 |
rv = setgid(gid); |
| 1695 |
|
| 1696 |
=item C<setitimer> |
| 1697 |
|
| 1698 |
(old_int_sec, old_int_usec, old_val_sec, old_val_usec) = |
| 1699 |
setitimer(which, int_sec, int_usec, val_sec, val_usec); |
| 1700 |
|
| 1701 |
I<which> is one of C<ITIMER_REAL>, C<ITIMER_VIRTUAL>, C<ITIMER_PROF>. |
| 1702 |
|
| 1703 |
POSIX.1-2008 marks C<getitimer()> and C<setitimer()> obsolete, recommending |
| 1704 |
the use of the POSIX timers API (L<C<timer_gettime()>|"timer_gettime">, |
| 1705 |
L<C<timer_settime()>|"timer_settime">, etc.) instead. |
| 1706 |
|
| 1707 |
POSIX.1-2024 removed C<getitimer()> and C<setitimer()>. |
| 1708 |
|
| 1709 |
=item C<setpriority> |
| 1710 |
|
| 1711 |
rv = setpriority(prio, which=PRIO_PROCESS, who=0); |
| 1712 |
|
| 1713 |
I<which> can be one of C<PRIO_PROCESS>, C<PRIO_PGRP>, C<PRIO_USER>, defaults |
| 1714 |
to C<PRIO_PROCESS>. I<who> defaults to 0. |
| 1715 |
|
| 1716 |
Note that due to the support of default values for I<which> and I<who>, |
| 1717 |
I<prio> is the first call parameter, whereas in the actual syscall it is the |
| 1718 |
last. |
| 1719 |
|
| 1720 |
Returns true on success, undef on error. |
| 1721 |
|
| 1722 |
=item C<setregid> |
| 1723 |
|
| 1724 |
rv = setregid(rgid, egid); |
| 1725 |
|
| 1726 |
=item C<setresgid> |
| 1727 |
|
| 1728 |
rv = setresgid(rgid, egid, sgid); |
| 1729 |
|
| 1730 |
C<setresgid()> was standardized with POSIX.1-2024. |
| 1731 |
|
| 1732 |
I<New in version 0.27.> |
| 1733 |
|
| 1734 |
=item C<setresuid> |
| 1735 |
|
| 1736 |
rv = setresuid(ruid, euid, suid); |
| 1737 |
|
| 1738 |
C<setresuid()> was standardized with POSIX.1-2024. |
| 1739 |
|
| 1740 |
I<New in version 0.27.> |
| 1741 |
|
| 1742 |
=item C<setreuid> |
| 1743 |
|
| 1744 |
rv = setreuid(ruid, euid); |
| 1745 |
|
| 1746 |
=item C<setsid> |
| 1747 |
|
| 1748 |
sid = setsid(); |
| 1749 |
|
| 1750 |
I<New in version 0.19.> |
| 1751 |
|
| 1752 |
=item C<setuid> |
| 1753 |
|
| 1754 |
rv = setuid(uid); |
| 1755 |
|
| 1756 |
=item C<setutxent> |
| 1757 |
|
| 1758 |
setutxent(); |
| 1759 |
|
| 1760 |
=item C<sighold> |
| 1761 |
|
| 1762 |
rv = sighold(sig); |
| 1763 |
|
| 1764 |
POSIX.1-2008 marks this function as obsolete, recommending the use of |
| 1765 |
L<POSIX/"sigprocmask"> instead. |
| 1766 |
|
| 1767 |
=item C<sigignore> |
| 1768 |
|
| 1769 |
rv = sigignore(sig); |
| 1770 |
|
| 1771 |
POSIX.1-2008 marks this function as obsolete, recommending the use of |
| 1772 |
L<POSIX/"sigaction"> instead. Or use C<$SIG{SIG} = 'IGNORE';>. |
| 1773 |
|
| 1774 |
=item C<signbit> |
| 1775 |
|
| 1776 |
b = signbit(x); |
| 1777 |
|
| 1778 |
=item C<sigpause> |
| 1779 |
|
| 1780 |
sigpause(sig); |
| 1781 |
|
| 1782 |
POSIX.1-2008 marks this function as obsolete, recommending the use of |
| 1783 |
L<POSIX/"sigsuspend"> instead. |
| 1784 |
|
| 1785 |
=item C<sigrelse> |
| 1786 |
|
| 1787 |
rv = sigrelse(sig); |
| 1788 |
|
| 1789 |
POSIX.1-2008 marks this function as obsolete, recommending the use of |
| 1790 |
L<POSIX/"sigprocmask"> instead. |
| 1791 |
|
| 1792 |
=item C<sin> |
| 1793 |
|
| 1794 |
y = sin(x); |
| 1795 |
|
| 1796 |
I<New in version 0.19.> |
| 1797 |
|
| 1798 |
=item C<sinh> |
| 1799 |
|
| 1800 |
y = sinh(x); |
| 1801 |
|
| 1802 |
=item C<sqrt> |
| 1803 |
|
| 1804 |
y = sqrt(x); |
| 1805 |
|
| 1806 |
=item C<srand48> |
| 1807 |
|
| 1808 |
srand48(seedval); |
| 1809 |
|
| 1810 |
=item C<srandom> |
| 1811 |
|
| 1812 |
srandom(seed); |
| 1813 |
|
| 1814 |
=item C<stat> |
| 1815 |
|
| 1816 |
(dev, ino, mode, nlink, uid, gid, rdev, size, atim_sec, mtim_sec, ctim_sec, |
| 1817 |
blksize, blocks, atim_nsec, mtim_nsec, ctim_nsec) = stat(what); |
| 1818 |
|
| 1819 |
I<what> can be a path, a Perl file handle or a file descriptor. |
| 1820 |
|
| 1821 |
I<ctim_sec>, I<blksize>, I<blocks> and nanoseconds may not be available on |
| 1822 |
your system. |
| 1823 |
|
| 1824 |
Values outside Perl's internal integer range are returned as strings, i.e. if |
| 1825 |
you need the exact values you should, for example, use C<eq> instead of C<==> |
| 1826 |
for comparisons. |
| 1827 |
|
| 1828 |
Note that C<CORE::stat()> lies to you in some cases: It returns I<rdev> as a |
| 1829 |
signed integer even if your OS's C<dev_t> is unsigned. It returns I<size> as |
| 1830 |
a floating point number if your OS's C<off_t> is bigger than Perl's integer |
| 1831 |
size. It returns the times as floating point numbers if your OS's C<time_t> |
| 1832 |
is unsigned. |
| 1833 |
|
| 1834 |
C<POSIX::2008::stat()> doesn't mimic these bugs and uses the correct data types |
| 1835 |
for all values. |
| 1836 |
|
| 1837 |
In list context, it returns the above list on success or the empty list on |
| 1838 |
error. In scalar context, it returns a (non-undef) boolean value indicating |
| 1839 |
success or failure. |
| 1840 |
|
| 1841 |
=item C<statvfs> |
| 1842 |
|
| 1843 |
(f_bsize, f_frsize, f_blocks, f_bfree, f_bavail, f_files, f_ffree, f_favail, |
| 1844 |
f_fsid, f_flag, f_namemax) = statvfs(what); |
| 1845 |
|
| 1846 |
I<what> can be a path, a Perl file handle or a file descriptor. |
| 1847 |
|
| 1848 |
Values outside Perl's internal integer range are returned as strings as with |
| 1849 |
L<C<stat()>|"stat">. Note that L<Filesys::Statvfs|Filesys::Statvfs> returns |
| 1850 |
only floating point numbers which may give wrong results, and it lacks |
| 1851 |
I<f_fsid>. |
| 1852 |
|
| 1853 |
Only the ST_NOSUID and ST_RDONLY flags of the I<f_flag> field are specified |
| 1854 |
in POSIX but this module provides additional ST_ flags if available. |
| 1855 |
|
| 1856 |
In list context, it returns the above list on success or the empty list on |
| 1857 |
error. In scalar context, it returns a (non-undef) boolean value indicating |
| 1858 |
success or failure. |
| 1859 |
|
| 1860 |
I<New in version 0.25.> |
| 1861 |
|
| 1862 |
=item C<strptime> |
| 1863 |
|
| 1864 |
(sec, min, hour, mday, mon, year, wday, yday, isdst, gmtoff, zone) = |
| 1865 |
strptime(s, format[, sec, min, hour, mday, mon, year, wday, yday, isdst, |
| 1866 |
gmtoff, zone]); |
| 1867 |
|
| 1868 |
... = strptime(s, format, \@tm); |
| 1869 |
|
| 1870 |
C<strptime()> converts the string I<s> into a broken-down time according to |
| 1871 |
the format string I<format>. |
| 1872 |
|
| 1873 |
The time fields may optionally be initialized in whole or in part either with |
| 1874 |
up to 11 separate arguments or with a single array reference after the format. |
| 1875 |
Omitted arguments are treated as undef. In case of an array reference the array |
| 1876 |
is updated according to the fields affected by the format string. If an error |
| 1877 |
occurred the array is not udpated. |
| 1878 |
|
| 1879 |
In list context it returns the broken-down time or the empty list on error. |
| 1880 |
|
| 1881 |
Fields not affected by the format string may be returned as initialized, set to |
| 1882 |
default values, or recomputed depending on your OS (e.g. glibc "recomputes" |
| 1883 |
I<wday> and I<yday> if any of the year, month, or day elements changed). |
| 1884 |
|
| 1885 |
In scalar context it returns the index of the first byte in I<s> that was not |
| 1886 |
processed or the byte length of I<s> if the whole string was consumed or undef |
| 1887 |
on error. |
| 1888 |
|
| 1889 |
As C<strptime()> acts on null-terminated strings, strings containing NUL bytes |
| 1890 |
will only be processed up to the first NUL byte. |
| 1891 |
|
| 1892 |
I<gmtoff> and I<zone> were standardized with POSIX.1-2024. They might not be |
| 1893 |
supported by your system, and I<zone> might be ignored entirely. |
| 1894 |
|
| 1895 |
I<New in version 0.02.> |
| 1896 |
|
| 1897 |
I<Changed in version 0.24:> Accept an array reference as the third argument |
| 1898 |
(L<RT#66519|https://rt.cpan.org/Public/Bug/Display.html?id=66519>). |
| 1899 |
|
| 1900 |
I<Changed in version 0.27:> Support gmtoff and zone. |
| 1901 |
|
| 1902 |
=item C<strsignal> |
| 1903 |
|
| 1904 |
str = strsignal(sig); |
| 1905 |
|
| 1906 |
I<New in version 0.25.> |
| 1907 |
|
| 1908 |
=item C<symlink> |
| 1909 |
|
| 1910 |
rv = symlink(target, linkpath); |
| 1911 |
|
| 1912 |
=item C<symlinkat> |
| 1913 |
|
| 1914 |
rv = symlinkat(target, dirfd, linkpath); |
| 1915 |
|
| 1916 |
=item C<sync> |
| 1917 |
|
| 1918 |
sync(); |
| 1919 |
|
| 1920 |
This function doesn't return any value. |
| 1921 |
|
| 1922 |
=item C<sysconf> |
| 1923 |
|
| 1924 |
rv = sysconf(name); |
| 1925 |
|
| 1926 |
I<name> is one of the C<_SC_*> integer constants. |
| 1927 |
|
| 1928 |
Returns undef on error. |
| 1929 |
|
| 1930 |
I<New in version 0.22.> |
| 1931 |
|
| 1932 |
=item C<tan> |
| 1933 |
|
| 1934 |
y = tan(x); |
| 1935 |
|
| 1936 |
=item C<tanh> |
| 1937 |
|
| 1938 |
y = tanh(x); |
| 1939 |
|
| 1940 |
=item C<tgamma> |
| 1941 |
|
| 1942 |
y = tgamma(x); |
| 1943 |
|
| 1944 |
=item C<timer_create> |
| 1945 |
|
| 1946 |
timerid = timer_create(clockid, signal=undef); |
| 1947 |
|
| 1948 |
Creates a new per-process interval timer using the clock given by I<clock_id> |
| 1949 |
as the timing base. I<signal> is the signal number to be delivered when the |
| 1950 |
timer expires. If I<signal> is omitted or undef, no signal is delivered and |
| 1951 |
the progress of the timer can be monitored using |
| 1952 |
L<C<timer_gettime()>|"timer_gettime">. |
| 1953 |
|
| 1954 |
Calling a notification function on timer expiration is currently not |
| 1955 |
supported. |
| 1956 |
|
| 1957 |
Returns undef on error. |
| 1958 |
|
| 1959 |
I<New in version 0.16.> |
| 1960 |
|
| 1961 |
I<Changed in version 0.22:> I<signal> is optional. |
| 1962 |
|
| 1963 |
=item C<timer_delete> |
| 1964 |
|
| 1965 |
rv = timer_delete(timerid); |
| 1966 |
|
| 1967 |
Returns C<0 but true> on success, undef on error. |
| 1968 |
|
| 1969 |
I<New in version 0.16.> |
| 1970 |
|
| 1971 |
=item C<timer_getoverrun> |
| 1972 |
|
| 1973 |
count = timer_getoverrun(timerid); |
| 1974 |
|
| 1975 |
Returns undef on error. |
| 1976 |
|
| 1977 |
I<New in version 0.16.> |
| 1978 |
|
| 1979 |
=item C<timer_gettime> |
| 1980 |
|
| 1981 |
(interval_sec, interval_nsec, initial_sec, initial_nsec) = |
| 1982 |
timer_gettime(timerid); |
| 1983 |
|
| 1984 |
Returns the empty list on error. |
| 1985 |
|
| 1986 |
I<New in version 0.16.> |
| 1987 |
|
| 1988 |
=item C<timer_settime> |
| 1989 |
|
| 1990 |
(old_int_sec, old_int_nsec, old_init_sec, old_init_nsec) = |
| 1991 |
timer_settime(timerid, flags, int_sec, int_nsec, [init_sec, init_nsec]); |
| 1992 |
|
| 1993 |
I<flags> may be 0 or C<TIMER_ABSTIME>. If the I<init> values are omitted, they |
| 1994 |
are set to the I<int> values. |
| 1995 |
|
| 1996 |
I<New in version 0.16.> |
| 1997 |
|
| 1998 |
=item C<truncate> |
| 1999 |
|
| 2000 |
rv = truncate(what, length); |
| 2001 |
|
| 2002 |
I<what> can be a path, a Perl file handle, or a file descriptor. |
| 2003 |
|
| 2004 |
Note that it does not flush the file handle before truncating. Perl's built-in |
| 2005 |
truncate() does (this is undocumented, probably because it's silly). |
| 2006 |
|
| 2007 |
I<Changed in version 0.19:> Deprecated I<ftruncate> now covered by I<truncate>. |
| 2008 |
|
| 2009 |
=item C<trunc> |
| 2010 |
|
| 2011 |
y = trunc(x); |
| 2012 |
|
| 2013 |
=item C<ttyname> |
| 2014 |
|
| 2015 |
name = ttyname(fd); |
| 2016 |
|
| 2017 |
Calls C<ttyname_r()> if available. |
| 2018 |
|
| 2019 |
I<New in version 0.19.> |
| 2020 |
|
| 2021 |
I<Changed in version 0.22:> I<fd> may also be a file handle. |
| 2022 |
|
| 2023 |
=item C<unlink> |
| 2024 |
|
| 2025 |
rv = unlink(path); |
| 2026 |
|
| 2027 |
Calls the actual C library function C<unlink()>. |
| 2028 |
|
| 2029 |
Note that core C<POSIX::unlink()> calls C<CORE::unlink()>, which, unless you |
| 2030 |
start Perl with C<-U>, a) is prone to time-of-check/time-of-use race |
| 2031 |
conditions due to an additional lstat(), and b) blindly fails with C<EISDIR> |
| 2032 |
for directories (due to said lstat()), ignoring that some OSes use C<EPERM> in |
| 2033 |
this case (as required by POSIX). |
| 2034 |
|
| 2035 |
=item C<unlinkat> |
| 2036 |
|
| 2037 |
rv = unlinkat(dirfd, path, flags=0); |
| 2038 |
|
| 2039 |
I<flags> can be 0 or C<AT_REMOVEDIR>. |
| 2040 |
|
| 2041 |
=item C<unlockpt> |
| 2042 |
|
| 2043 |
rv = unlockpt(fd); |
| 2044 |
|
| 2045 |
I<New in version 0.27.> |
| 2046 |
|
| 2047 |
=item C<utimensat> |
| 2048 |
|
| 2049 |
rv = utimensat(dirfd, path, flags, atime_sec, atime_nsec, mtime_sec, |
| 2050 |
mtime_nsec); |
| 2051 |
|
| 2052 |
I<flags> can be 0 or C<AT_SYMLINK_NOFOLLOW>, defaults to 0. Your system might |
| 2053 |
support a different set of flags. |
| 2054 |
|
| 2055 |
I<atime_sec> and I<mtime_sec> default to 0. I<atime_nsec> and I<mtime_nsec> |
| 2056 |
default to C<UTIME_NOW>. |
| 2057 |
|
| 2058 |
=item C<write> |
| 2059 |
|
| 2060 |
bytes_written = write(fd, buf, count=undef); |
| 2061 |
|
| 2062 |
Like C<POSIX::write()> but returns 0 instead of C<0 but true> if 0 bytes were |
| 2063 |
written, and never writes more bytes than I<buf> contains even if I<count> |
| 2064 |
exceeds the length of I<buf>. |
| 2065 |
|
| 2066 |
If I<count> is omitted or undef, it defaults to the length of I<buf>. |
| 2067 |
|
| 2068 |
=item C<writev> |
| 2069 |
|
| 2070 |
bytes_written = writev(fd, buffers); |
| 2071 |
|
| 2072 |
C<writev()> writes multiple I<buffers> of data to the file associated with the |
| 2073 |
file descriptor I<fd>. |
| 2074 |
|
| 2075 |
I<buffers> must be an array reference, i.e. C<\@buf>, C<$buf> or C<[...]>. The |
| 2076 |
buffers are processed in array order. |
| 2077 |
|
| 2078 |
Each buffer can be simple scalar (usually a string) or an array reference of |
| 2079 |
the form C<[scalar, offset, length]> to write I<length> bytes of I<scalar> |
| 2080 |
from position I<offset>. A negative I<offset> counts from the end of |
| 2081 |
I<scalar>. If omitted, I<offset> defaults to 0, I<length> defaults to the |
| 2082 |
string length of I<scalar> starting at I<offset>. An I<offset> beyond either |
| 2083 |
end of I<scalar> causes the call to croak. I<length> is capped so that it |
| 2084 |
doesn't exceed the end of I<scalar>. |
| 2085 |
|
| 2086 |
Note that C<writev($fh, $buf);> is not the same as C<print $fh, @$buf;> or |
| 2087 |
C<syswrite $fh, $_ for @$buf;> because C<writev()> transfers data atomically |
| 2088 |
as a single block. See the manpage for details. |
| 2089 |
|
| 2090 |
Returns the number of bytes written or undef on error. |
| 2091 |
|
| 2092 |
I<New in version 0.08.> |
| 2093 |
|
| 2094 |
I<Changed in version 0.27:> Buffers may be array references. |
| 2095 |
|
| 2096 |
=item C<y0> |
| 2097 |
|
| 2098 |
y = y0(x); |
| 2099 |
|
| 2100 |
C<y0()> is the Bessel function of the second kind of order 0. |
| 2101 |
|
| 2102 |
=item C<y1> |
| 2103 |
|
| 2104 |
y = y1(x); |
| 2105 |
|
| 2106 |
C<y1()> is the Bessel function of the second kind of order 1. |
| 2107 |
|
| 2108 |
=item C<yn> |
| 2109 |
|
| 2110 |
y = yn(n, x); |
| 2111 |
|
| 2112 |
C<yn()> is the Bessel function of the second kind of order n. |
| 2113 |
|
| 2114 |
=back |
| 2115 |
|
| 2116 |
=head1 EXPORTS |
| 2117 |
|
| 2118 |
This module does not export anything by default. The following export tags are |
| 2119 |
available: |
| 2120 |
|
| 2121 |
:at All *at() functions like openat(), all AT_/RENAME_/RESOLVE_ constants |
| 2122 |
:id All get/set*id() functions like getuid() etc. |
| 2123 |
:is All is* functions like isdigit() etc. |
| 2124 |
:rw read(), readv(), write(), writev() |
| 2125 |
:prw pread(), preadv(), preadv2(), pwrite(), pwritev(), pwritev2() |
| 2126 |
:clock All clock* functions and CLOCK_ constants and TIMER_ABSTIME |
| 2127 |
:errno_h errno constants |
| 2128 |
:fcntl All F_, FD_, O_, POSIX_FADV_, SEEK_, _OK constants (for AT_ use :at) |
| 2129 |
:fenv_h All FE_ constants and fe* functions |
| 2130 |
:fnm fnmatch() and all FNM_ constants |
| 2131 |
:poll poll(), ppoll() and all POLL constants |
| 2132 |
:socket_h All constants from L<sys/socket.h|https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_socket.h.html> |
| 2133 |
:stat_h All S_I* and UTIME_ constants |
| 2134 |
:time_h All CLOCK_ and TIMER_ constants |
| 2135 |
:timer All timer_ functions and TIMER_ constants |
| 2136 |
:utmpx_h All *utx* functions and L<utmpx.h|https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/utmpx.h.html> constants |
| 2137 |
:confstr confstr() and all _CS_ constants |
| 2138 |
:pathconf pathconf() and all _PC_ constants |
| 2139 |
:sysconf sysconf() and all _SC_ constants |
| 2140 |
|
| 2141 |
I<New in version 0.19:> :stat_h export tag. |
| 2142 |
|
| 2143 |
I<New in version 0.20:> :fenv_h export tag. |
| 2144 |
|
| 2145 |
I<New in version 0.22:> :confstr, :pathconf, :sysconf export tags. |
| 2146 |
|
| 2147 |
I<New in version 0.25:> :poll export tag. |
| 2148 |
|
| 2149 |
I<New in version 0.24:> :socket_h export tag. |
| 2150 |
|
| 2151 |
I<New in version 0.27:> :errno_h export tag. |
| 2152 |
|
| 2153 |
=head1 CONSTANTS |
| 2154 |
|
| 2155 |
C<AF_INET> C<AF_INET6> C<AF_UNIX> C<AF_UNSPEC> |
| 2156 |
|
| 2157 |
C<AT_EACCESS> C<AT_EMPTY_PATH> C<AT_FDCWD> C<AT_NO_AUTOMOUNT> C<AT_REMOVEDIR> |
| 2158 |
C<AT_RESOLVE_BENEATH> C<AT_SYMLINK_FOLLOW> C<AT_SYMLINK_NOFOLLOW> |
| 2159 |
|
| 2160 |
C<BOOT_TIME> C<NEW_TIME> C<OLD_TIME> C<RUN_LVL> C<DEAD_PROCESS> |
| 2161 |
C<INIT_PROCESS> C<LOGIN_PROCESS> C<USER_PROCESS> C<ACCOUNTING> C<EMPTY> |
| 2162 |
C<UT_UNKNOWN> |
| 2163 |
|
| 2164 |
C<CLOCK_BOOTTIME> C<CLOCK_BOOTTIME_ALARM> C<CLOCK_HIGHRES> C<CLOCK_MONOTONIC> |
| 2165 |
C<CLOCK_MONOTONIC_COARSE> C<CLOCK_MONOTONIC_FAST> C<CLOCK_MONOTONIC_PRECISE> |
| 2166 |
C<CLOCK_MONOTONIC_RAW> C<CLOCK_PROCESS_CPUTIME_ID> C<CLOCK_PROF> |
| 2167 |
C<CLOCK_REALTIME> C<CLOCK_REALTIME_ALARM> C<CLOCK_REALTIME_COARSE> |
| 2168 |
C<CLOCK_REALTIME_FAST> C<CLOCK_REALTIME_PRECISE> C<CLOCK_SECOND> |
| 2169 |
C<CLOCK_SOFTTIME> C<CLOCK_TAI> C<CLOCK_THREAD_CPUTIME_ID> C<CLOCK_UPTIME> |
| 2170 |
C<CLOCK_UPTIME_FAST> C<CLOCK_UPTIME_PRECISE> C<CLOCK_VIRTUAL> |
| 2171 |
|
| 2172 |
C<E2BIG> C<EACCES> C<EADDRINUSE> C<EADDRNOTAVAIL> C<EAFNOSUPPORT> C<EAGAIN> |
| 2173 |
C<EALREADY> C<EBADF> C<EBADMSG> C<EBUSY> C<ECANCELED> C<ECHILD> |
| 2174 |
C<ECONNABORTED> C<ECONNREFUSED> C<ECONNRESET> C<EDEADLK> C<EDESTADDRREQ> |
| 2175 |
C<EDOM> C<EDQUOT> C<EEXIST> C<EFAULT> C<EFBIG> C<EHOSTUNREACH> C<EIDRM> |
| 2176 |
C<EILSEQ> C<EINPROGRESS> C<EINTR> C<EINVAL> C<EIO> C<EISCONN> C<EISDIR> |
| 2177 |
C<ELOOP> C<EMFILE> C<EMLINK> C<EMSGSIZE> C<EMULTIHOP> C<ENAMETOOLONG> |
| 2178 |
C<ENETDOWN> C<ENETRESET> C<ENETUNREACH> C<ENFILE> C<ENOBUFS> C<ENODEV> |
| 2179 |
C<ENOENT> C<ENOEXEC> C<ENOLCK> C<ENOLINK> C<ENOMEM> C<ENOMSG> C<ENOPROTOOPT> |
| 2180 |
C<ENOSPC> C<ENOSYS> C<ENOTCONN> C<ENOTDIR> C<ENOTEMPTY> C<ENOTRECOVERABLE> |
| 2181 |
C<ENOTSOCK> C<ENOTSUP> C<ENOTTY> C<ENXIO> C<EOPNOTSUPP> C<EOVERFLOW> |
| 2182 |
C<EOWNERDEAD> C<EPERM> C<EPIPE> C<EPROTO> C<EPROTONOSUPPORT> C<EPROTOTYPE> |
| 2183 |
C<ERANGE> C<EROFS> C<ESOCKTNOSUPPORT> C<ESPIPE> C<ESRCH> C<ESTALE> |
| 2184 |
C<ETIMEDOUT> C<ETXTBSY> C<EWOULDBLOCK> C<EXDEV> |
| 2185 |
|
| 2186 |
C<F_DUPFD> C<F_DUPFD_CLOEXEC> C<F_DUPFD_CLOFORK> C<F_GETFD> C<F_SETFD> |
| 2187 |
C<F_GETFL> C<F_SETFL> C<F_GETLK> C<F_SETLK> C<F_SETLKW> C<F_OFD_GETLK> |
| 2188 |
C<F_OFD_SETLK> C<F_OFD_SETLKW> C<F_GETOWN> C<F_GETOWN_EX> C<F_SETOWN> |
| 2189 |
C<F_SETOWN_EX> C<F_RDLCK> C<F_UNLCK> C<F_WRLCK> C<FD_CLOEXEC> C<FD_CLOFORK> |
| 2190 |
C<F_OWNER_PID> C<F_OWNER_PGRP> |
| 2191 |
|
| 2192 |
C<FE_TONEAREST> C<FE_TOWARDZERO> C<FE_UPWARD> C<FE_DOWNWARD> C<FE_DIVBYZERO> |
| 2193 |
C<FE_INEXACT> C<FE_INVALID> C<FE_OVERFLOW> C<FE_UNDERFLOW> C<FE_ALL_EXCEPT> |
| 2194 |
|
| 2195 |
C<FNM_CASEFOLD> C<FNM_FILE_NAME> C<FNM_IGNORECASE> C<FNM_LEADING_DIR> |
| 2196 |
C<FNM_NOESCAPE> C<FNM_NOMATCH> C<FNM_PATHNAME> C<FNM_PERIOD> |
| 2197 |
|
| 2198 |
C<FLT_EVAL_METHOD> C<FLT_RADIX> C<FP_INFINITE> C<FP_NAN> C<FP_NORMAL> |
| 2199 |
C<FP_SUBNORMAL> C<FP_ZERO> C<FP_FAST_FMA> C<FP_FAST_FMAF> C<FP_FAST_FMAL> |
| 2200 |
C<FP_ILOGB0> C<FP_ILOGBNAN> C<MATH_ERRNO> C<MATH_ERREXCEPT> |
| 2201 |
|
| 2202 |
C<GETENTROPY_MAX> C<NSIG_MAX> C<NZERO> |
| 2203 |
|
| 2204 |
C<HUGE_VAL> C<INFINITY> |
| 2205 |
|
| 2206 |
C<ITIMER_PROF> C<ITIMER_REAL> C<ITIMER_VIRTUAL> |
| 2207 |
|
| 2208 |
C<MSG_CMSG_CLOEXEC> C<MSG_CMSG_CLOFORK> C<MSG_CTRUNC> C<MSG_DONTROUTE> |
| 2209 |
C<MSG_EOR> C<MSG_NOSIGNAL> C<MSG_OOB> C<MSG_PEEK> C<MSG_TRUNC> C<MSG_WAITALL> |
| 2210 |
|
| 2211 |
C<O_ACCMODE> C<O_APPEND> C<O_ASYNC> C<O_CLOEXEC> C<O_CLOFORK> C<O_CREAT> |
| 2212 |
C<O_DIRECT> C<O_DIRECTORY> C<O_DSYNC> C<O_EMPTY_PATH> C<O_EXCL> C<O_EXEC> |
| 2213 |
C<O_EXLOCK> C<O_LARGEFILE> C<O_NDELAY> C<O_NOATIME> C<O_NOCTTY> C<O_NOFOLLOW> |
| 2214 |
C<O_NONBLOCK> C<O_NOSIGPIPE> C<O_NOSTDFD> C<O_PATH> C<O_RDONLY> C<O_RDWR> |
| 2215 |
C<O_REGULAR> C<O_RESOLVE_BENEATH> C<O_RSYNC> C<O_SEARCH> C<O_SHLOCK> C<O_SYNC> |
| 2216 |
C<O_TMPFILE> C<O_TRUNC> C<O_TTY_INIT> C<O_WRONLY> C<FASYNC> |
| 2217 |
|
| 2218 |
C<POSIX_FADV_NORMAL> C<POSIX_FADV_SEQUENTIAL> C<POSIX_FADV_RANDOM> |
| 2219 |
C<POSIX_FADV_NOREUSE> C<POSIX_FADV_WILLNEED> C<POSIX_FADV_DONTNEED> |
| 2220 |
|
| 2221 |
C<PRIO_PROCESS> C<PRIO_PGRP> C<PRIO_USER> |
| 2222 |
|
| 2223 |
C<RENAME_EXCHANGE> C<RENAME_NOREPLACE> C<RENAME_WHITEOUT> C<RESOLVE_BENEATH> |
| 2224 |
C<RESOLVE_IN_ROOT> C<RESOLVE_NO_MAGICLINKS> C<RESOLVE_NO_SYMLINKS> |
| 2225 |
C<RESOLVE_NO_XDEV> C<RESOLVE_CACHED> |
| 2226 |
|
| 2227 |
C<RTLD_DEFAULT> C<RTLD_GLOBAL> C<RTLD_LAZY> C<RTLD_LOCAL> C<RTLD_NEXT> |
| 2228 |
C<RTLD_NOW> |
| 2229 |
|
| 2230 |
C<RTLD_DEEPBIND> C<RTLD_MEMBER> C<RTLD_NOAUTODEFER> C<RTLD_NODELETE> |
| 2231 |
C<RTLD_NOLOAD> |
| 2232 |
|
| 2233 |
C<RWF_APPEND> C<RWF_ATOMIC> C<RWF_DONTCACHE> C<RWF_DSYNC> C<RWF_HIPRI> |
| 2234 |
C<RWF_NOAPPEND> C<RWF_NOSIGNAL> C<RWF_NOWAIT> C<RWF_SUPPORTED> C<RWF_SYNC> |
| 2235 |
|
| 2236 |
C<S_IFMT> C<S_IFBLK> C<S_IFCHR> C<S_IFIFO> C<S_IFREG> C<S_IFDIR> C<S_IFLNK> |
| 2237 |
C<S_IFSOCK> C<S_ISUID> C<S_ISGID> C<S_IRWXU> C<S_IRUSR> C<S_IWUSR> C<S_IXUSR> |
| 2238 |
C<S_IRWXG> C<S_IRGRP> C<S_IWGRP> C<S_IXGRP> C<S_IRWXO> C<S_IROTH> C<S_IWOTH> |
| 2239 |
C<S_IXOTH> C<S_ISVTX> |
| 2240 |
|
| 2241 |
C<SCM_RIGHTS> |
| 2242 |
|
| 2243 |
C<SEEK_SET> C<SEEK_CUR> C<SEEK_END> C<SEEK_DATA> C<SEEK_HOLE> |
| 2244 |
|
| 2245 |
C<SHUT_RD> C<SHUT_RDWR> C<SHUT_WR> |
| 2246 |
|
| 2247 |
C<SOCK_DGRAM> C<SOCK_RAW> C<SOCK_SEQPACKET> C<SOCK_STREAM> C<SOCK_NDELAY> |
| 2248 |
C<SOCK_NONBLOCK> C<SOCK_CLOEXEC> C<SOCK_CLOFORK> |
| 2249 |
|
| 2250 |
C<SOL_SOCKET> C<SOMAXCONN> |
| 2251 |
|
| 2252 |
C<SO_ACCEPTCONN> C<SO_BROADCAST> C<SO_DEBUG> C<SO_DOMAIN> C<SO_DONTROUTE> |
| 2253 |
C<SO_ERROR> C<SO_KEEPALIVE> C<SO_LINGER> C<SO_OOBINLINE> C<SO_PROTOCOL> |
| 2254 |
C<SO_RCVBUF> C<SO_RCVLOWAT> C<SO_RCVTIMEO> C<SO_REUSEADDR> C<SO_SNDBUF> |
| 2255 |
C<SO_SNDLOWAT> C<SO_SNDTIMEO> C<SO_TYPE> |
| 2256 |
|
| 2257 |
C<TIMER_ABSTIME> C<UTIME_NOW> C<UTIME_OMIT> |
| 2258 |
|
| 2259 |
C<F_OK> C<R_OK> C<W_OK> C<X_OK> |
| 2260 |
|
| 2261 |
C<POLLERR> C<POLLHUP> C<POLLIN> C<POLLNVAL> C<POLLOUT> C<POLLPRI> C<POLLRDBAND> |
| 2262 |
C<POLLRDNORM> C<POLLWRBAND> C<POLLWRNORM> |
| 2263 |
|
| 2264 |
C<INFTIM> C<POLLFREE> C<POLLINIGNEOF> C<POLLMSG> C<POLLNORM> C<POLLRDHUP> |
| 2265 |
C<POLLREMOVE> C<POLLSTANDARD> C<POLL_BUSY_LOOP> |
| 2266 |
|
| 2267 |
C<ST_NOSUID> C<ST_RDONLY> |
| 2268 |
|
| 2269 |
C<ST_MANDLOCK> C<ST_NOATIME> C<ST_NODEV> C<ST_NODIRATIME> C<ST_NOEXEC> |
| 2270 |
C<ST_RELATIME> C<ST_SYNCHRONOUS> |
| 2271 |
|
| 2272 |
C<ST_ASYNC> C<ST_DEFEXPORTED> C<ST_EXKERB> C<ST_EXNORESPORT> C<ST_EXPORTANON> |
| 2273 |
C<ST_EXPORTED> C<ST_EXPUBLIC> C<ST_EXRDONLY> C<ST_LOCAL> C<ST_LOG> |
| 2274 |
C<ST_NOCOREDUMP> C<ST_NODEVMTIME> C<ST_QUOTA> C<ST_ROOTFS> C<ST_SYMPERM> |
| 2275 |
C<ST_UNION> |
| 2276 |
|
| 2277 |
C<FILESIZEBITS> C<LINK_MAX> C<MAX_CANON> C<MAX_INPUT> C<NAME_MAX> C<PATH_MAX> |
| 2278 |
C<PIPE_BUF> C<POSIX2_SYMLINKS> C<POSIX_ALLOC_SIZE_MIN> |
| 2279 |
C<POSIX_REC_INCR_XFER_SIZE> C<POSIX_REC_MAX_XFER_SIZE> |
| 2280 |
C<POSIX_REC_MIN_XFER_SIZE> C<POSIX_REC_XFER_ALIGN> C<SYMLINK_MAX> |
| 2281 |
C<TEXTDOMAIN_MAX> |
| 2282 |
|
| 2283 |
C<AIO_LISTIO_MAX> C<AIO_MAX> C<AIO_PRIO_DELTA_MAX> C<ARG_MAX> C<ATEXIT_MAX> |
| 2284 |
C<BC_BASE_MAX> C<BC_DIM_MAX> C<BC_SCALE_MAX> C<BC_STRING_MAX> C<CHILD_MAX> |
| 2285 |
C<COLL_WEIGHTS_MAX> C<DELAYTIMER_MAX> C<EXPR_NEST_MAX> C<HOST_NAME_MAX> |
| 2286 |
C<IOV_MAX> C<LINE_MAX> C<LOGIN_NAME_MAX> C<MQ_OPEN_MAX> C<MQ_PRIO_MAX> |
| 2287 |
C<NGROUPS_MAX> C<OPEN_MAX> C<PAGESIZE> C<PAGE_SIZE> |
| 2288 |
C<PTHREAD_DESTRUCTOR_ITERATIONS> C<PTHREAD_KEYS_MAX> C<PTHREAD_THREADS_MAX> |
| 2289 |
C<RE_DUP_MAX> C<RTSIG_MAX> C<SEM_NSEMS_MAX> C<SEM_VALUE_MAX> C<SIGQUEUE_MAX> |
| 2290 |
C<STREAM_MAX> C<SYMLOOP_MAX> C<TIMER_MAX> C<TTY_NAME_MAX> C<TZNAME_MAX> |
| 2291 |
|
| 2292 |
C<CHAR_BIT> C<CHAR_MAX> C<UCHAR_MAX> C<SCHAR_MAX> C<CHAR_MIN> C<SCHAR_MIN> |
| 2293 |
C<INT_MAX> C<INT_MIN> C<LLONG_MAX> C<LLONG_MIN> C<LONG_BIT> C<LONG_MAX> |
| 2294 |
C<LONG_MIN> C<MB_LEN_MAX> C<SHRT_MAX> C<SHRT_MIN> C<SSIZE_MAX> C<UINT_MAX> |
| 2295 |
C<ULLONG_MAX> C<ULONG_MAX> C<USHRT_MAX> C<WORD_BIT> |
| 2296 |
|
| 2297 |
C<_POSIX_ASYNC_IO> C<_POSIX_CHOWN_RESTRICTED> C<_POSIX_CPUTIME> |
| 2298 |
C<_POSIX_FALLOC> C<_POSIX_NO_TRUNC> C<_POSIX_PRIO_IO> C<_POSIX_SYNC_IO> |
| 2299 |
C<_POSIX_THREAD_CPUTIME> C<_POSIX_TIMESTAMP_RESOLUTION> C<_POSIX_VDISABLE> |
| 2300 |
|
| 2301 |
C<_POSIX_ADVISORY_INFO> C<_POSIX_ASYNCHRONOUS_IO> C<_POSIX_BARRIERS> |
| 2302 |
C<_POSIX_CLOCK_SELECTION> C<_POSIX_DEVICE_CONTROL> C<_POSIX_FSYNC> |
| 2303 |
C<_POSIX_IPV6> C<_POSIX_JOB_CONTROL> C<_POSIX_MAPPED_FILES> C<_POSIX_MEMLOCK> |
| 2304 |
C<_POSIX_MEMLOCK_RANGE> C<_POSIX_MEMORY_PROTECTION> C<_POSIX_MESSAGE_PASSING> |
| 2305 |
C<_POSIX_MONOTONIC_CLOCK> C<_POSIX_PRIORITIZED_IO> |
| 2306 |
C<_POSIX_PRIORITY_SCHEDULING> C<_POSIX_RAW_SOCKETS> |
| 2307 |
C<_POSIX_READER_WRITER_LOCKS> C<_POSIX_REALTIME_SIGNALS> C<_POSIX_REGEXP> |
| 2308 |
C<_POSIX_SAVED_IDS> C<_POSIX_SEMAPHORES> C<_POSIX_SHARED_MEMORY_OBJECTS> |
| 2309 |
C<_POSIX_SHELL> C<_POSIX_SPAWN> C<_POSIX_SPIN_LOCKS> C<_POSIX_SPORADIC_SERVER> |
| 2310 |
C<_POSIX_SS_REPL_MAX> C<_POSIX_SYNCHRONIZED_IO> C<_POSIX_THREADS> |
| 2311 |
C<_POSIX_THREAD_ATTR_STACKADDR> C<_POSIX_THREAD_ATTR_STACKSIZE> |
| 2312 |
C<_POSIX_THREAD_PRIORITY_SCHEDULING> C<_POSIX_THREAD_PRIO_INHERIT> |
| 2313 |
C<_POSIX_THREAD_PRIO_PROTECT> C<_POSIX_THREAD_PROCESS_SHARED> |
| 2314 |
C<_POSIX_THREAD_ROBUST_PRIO_INHERIT> C<_POSIX_THREAD_ROBUST_PRIO_PROTECT> |
| 2315 |
C<_POSIX_THREAD_SAFE_FUNCTIONS> C<_POSIX_THREAD_SPORADIC_SERVER> |
| 2316 |
C<_POSIX_TIMEOUTS> C<_POSIX_TIMERS> C<_POSIX_TRACE> |
| 2317 |
C<_POSIX_TRACE_EVENT_FILTER> C<_POSIX_TRACE_EVENT_NAME_MAX> |
| 2318 |
C<_POSIX_TRACE_INHERIT> C<_POSIX_TRACE_LOG> C<_POSIX_TRACE_NAME_MAX> |
| 2319 |
C<_POSIX_TRACE_SYS_MAX> C<_POSIX_TRACE_USER_EVENT_MAX> |
| 2320 |
C<_POSIX_TYPED_MEMORY_OBJECTS> C<_POSIX_V6_ILP32_OFF32> |
| 2321 |
C<_POSIX_V6_ILP32_OFFBIG> C<_POSIX_V6_LP64_OFF64> C<_POSIX_V6_LPBIG_OFFBIG> |
| 2322 |
C<_POSIX_V7_ILP32_OFF32> C<_POSIX_V7_ILP32_OFFBIG> C<_POSIX_V7_LP64_OFF64> |
| 2323 |
C<_POSIX_V7_LPBIG_OFFBIG> C<_POSIX_V8_ILP32_OFF32> C<_POSIX_V8_ILP32_OFFBIG> |
| 2324 |
C<_POSIX_V8_LP64_OFF64> C<_POSIX_V8_LPBIG_OFFBIG> C<_POSIX_VERSION> |
| 2325 |
|
| 2326 |
C<_CS_GNU_LIBC_VERSION> C<_CS_GNU_LIBPTHREAD_VERSION> C<_CS_LFS64_CFLAGS> |
| 2327 |
C<_CS_LFS64_LDFLAGS> C<_CS_LFS64_LIBS> C<_CS_LFS64_LINTFLAGS> |
| 2328 |
C<_CS_LFS_CFLAGS> C<_CS_LFS_LDFLAGS> C<_CS_LFS_LIBS> C<_CS_LFS_LINTFLAGS> |
| 2329 |
|
| 2330 |
C<_CS_PATH> |
| 2331 |
|
| 2332 |
C<_CS_POSIX_V8_ILP32_OFF32_CFLAGS> C<_CS_POSIX_V8_ILP32_OFF32_LDFLAGS> |
| 2333 |
C<_CS_POSIX_V8_ILP32_OFF32_LIBS> C<_CS_POSIX_V8_ILP32_OFFBIG_CFLAGS> |
| 2334 |
C<_CS_POSIX_V8_ILP32_OFFBIG_LDFLAGS> C<_CS_POSIX_V8_ILP32_OFFBIG_LIBS> |
| 2335 |
C<_CS_POSIX_V8_LP64_OFF64_CFLAGS> C<_CS_POSIX_V8_LP64_OFF64_LDFLAGS> |
| 2336 |
C<_CS_POSIX_V8_LP64_OFF64_LIBS> C<_CS_POSIX_V8_LPBIG_OFFBIG_CFLAGS> |
| 2337 |
C<_CS_POSIX_V8_LPBIG_OFFBIG_LDFLAGS> C<_CS_POSIX_V8_LPBIG_OFFBIG_LIBS> |
| 2338 |
C<_CS_POSIX_V8_THREADS_CFLAGS> C<_CS_POSIX_V8_THREADS_LDFLAGS> |
| 2339 |
C<_CS_POSIX_V8_WIDTH_RESTRICTED_ENVS> C<_CS_V8_ENV> |
| 2340 |
|
| 2341 |
C<_CS_POSIX_V7_ILP32_OFF32_CFLAGS> C<_CS_POSIX_V7_ILP32_OFF32_LDFLAGS> |
| 2342 |
C<_CS_POSIX_V7_ILP32_OFF32_LIBS> C<_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS> |
| 2343 |
C<_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS> C<_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS> |
| 2344 |
C<_CS_POSIX_V7_ILP32_OFFBIG_LIBS> C<_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS> |
| 2345 |
C<_CS_POSIX_V7_LP64_OFF64_CFLAGS> C<_CS_POSIX_V7_LP64_OFF64_LDFLAGS> |
| 2346 |
C<_CS_POSIX_V7_LP64_OFF64_LIBS> C<_CS_POSIX_V7_LP64_OFF64_LINTFLAGS> |
| 2347 |
C<_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS> C<_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS> |
| 2348 |
C<_CS_POSIX_V7_LPBIG_OFFBIG_LIBS> C<_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS> |
| 2349 |
C<_CS_POSIX_V7_WIDTH_RESTRICTED_ENVS> C<_CS_V7_ENV> |
| 2350 |
C<_CS_V7_WIDTH_RESTRICTED_ENVS> |
| 2351 |
|
| 2352 |
C<_CS_POSIX_V6_ILP32_OFF32_CFLAGS> C<_CS_POSIX_V6_ILP32_OFF32_LDFLAGS> |
| 2353 |
C<_CS_POSIX_V6_ILP32_OFF32_LIBS> C<_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS> |
| 2354 |
C<_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS> C<_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS> |
| 2355 |
C<_CS_POSIX_V6_ILP32_OFFBIG_LIBS> C<_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS> |
| 2356 |
C<_CS_POSIX_V6_LP64_OFF64_CFLAGS> C<_CS_POSIX_V6_LP64_OFF64_LDFLAGS> |
| 2357 |
C<_CS_POSIX_V6_LP64_OFF64_LIBS> C<_CS_POSIX_V6_LP64_OFF64_LINTFLAGS> |
| 2358 |
C<_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS> C<_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS> |
| 2359 |
C<_CS_POSIX_V6_LPBIG_OFFBIG_LIBS> C<_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS> |
| 2360 |
C<_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS> C<_CS_V6_ENV> |
| 2361 |
C<_CS_V6_WIDTH_RESTRICTED_ENVS> |
| 2362 |
|
| 2363 |
C<_CS_POSIX_V5_WIDTH_RESTRICTED_ENVS> C<_CS_V5_WIDTH_RESTRICTED_ENVS> |
| 2364 |
|
| 2365 |
C<_CS_XBS5_ILP32_OFF32_CFLAGS> C<_CS_XBS5_ILP32_OFF32_LDFLAGS> |
| 2366 |
C<_CS_XBS5_ILP32_OFF32_LIBS> C<_CS_XBS5_ILP32_OFF32_LINTFLAGS> |
| 2367 |
C<_CS_XBS5_ILP32_OFFBIG_CFLAGS> C<_CS_XBS5_ILP32_OFFBIG_LDFLAGS> |
| 2368 |
C<_CS_XBS5_ILP32_OFFBIG_LIBS> C<_CS_XBS5_ILP32_OFFBIG_LINTFLAGS> |
| 2369 |
C<_CS_XBS5_LP64_OFF64_CFLAGS> C<_CS_XBS5_LP64_OFF64_LDFLAGS> |
| 2370 |
C<_CS_XBS5_LP64_OFF64_LIBS> C<_CS_XBS5_LP64_OFF64_LINTFLAGS> |
| 2371 |
C<_CS_XBS5_LPBIG_OFFBIG_CFLAGS> C<_CS_XBS5_LPBIG_OFFBIG_LDFLAGS> |
| 2372 |
C<_CS_XBS5_LPBIG_OFFBIG_LIBS> C<_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS> |
| 2373 |
|
| 2374 |
C<_PC_2_SYMLINKS> C<_PC_ALLOC_SIZE_MIN> C<_PC_ASYNC_IO> |
| 2375 |
C<_PC_CHOWN_RESTRICTED> C<_PC_FALLOC> C<_PC_FILESIZEBITS> C<_PC_LINK_MAX> |
| 2376 |
C<_PC_MAX_CANON> C<_PC_MAX_INPUT> C<_PC_NAME_MAX> C<_PC_NO_TRUNC> |
| 2377 |
C<_PC_PATH_MAX> C<_PC_PIPE_BUF> C<_PC_PRIO_IO> C<_PC_REC_INCR_XFER_SIZE> |
| 2378 |
C<_PC_REC_MAX_XFER_SIZE> C<_PC_REC_MIN_XFER_SIZE> C<_PC_REC_XFER_ALIGN> |
| 2379 |
C<_PC_SOCK_MAXBUF> C<_PC_SYMLINK_MAX> C<_PC_SYNC_IO> C<_PC_TEXTDOMAIN_MAX> |
| 2380 |
C<_PC_TIMESTAMP_RESOLUTION> C<_PC_VDISABLE> |
| 2381 |
|
| 2382 |
C<_SC_2_CHAR_TERM> C<_SC_2_C_BIND> C<_SC_2_C_DEV> C<_SC_2_C_VERSION> |
| 2383 |
C<_SC_2_FORT_DEV> C<_SC_2_FORT_RUN> C<_SC_2_LOCALEDEF> C<_SC_2_PBS> |
| 2384 |
C<_SC_2_PBS_ACCOUNTING> C<_SC_2_PBS_CHECKPOINT> C<_SC_2_PBS_LOCATE> |
| 2385 |
C<_SC_2_PBS_MESSAGE> C<_SC_2_PBS_TRACK> C<_SC_2_SW_DEV> C<_SC_2_UPE> |
| 2386 |
C<_SC_2_VERSION> C<_SC_ADVISORY_INFO> C<_SC_AIO_LISTIO_MAX> C<_SC_AIO_MAX> |
| 2387 |
C<_SC_AIO_PRIO_DELTA_MAX> C<_SC_ARG_MAX> C<_SC_ASYNCHRONOUS_IO> |
| 2388 |
C<_SC_ATEXIT_MAX> C<_SC_AVPHYS_PAGES> C<_SC_BARRIERS> C<_SC_BASE> |
| 2389 |
C<_SC_BC_BASE_MAX> C<_SC_BC_DIM_MAX> C<_SC_BC_SCALE_MAX> C<_SC_BC_STRING_MAX> |
| 2390 |
C<_SC_CHARCLASS_NAME_MAX> C<_SC_CHAR_BIT> C<_SC_CHAR_MAX> C<_SC_CHAR_MIN> |
| 2391 |
C<_SC_CHILD_MAX> C<_SC_CLK_TCK> C<_SC_CLOCK_SELECTION> C<_SC_COLL_WEIGHTS_MAX> |
| 2392 |
C<_SC_CPUTIME> C<_SC_C_LANG_SUPPORT> C<_SC_C_LANG_SUPPORT_R> |
| 2393 |
C<_SC_DELAYTIMER_MAX> C<_SC_DEVICE_CONTROL> C<_SC_DEVICE_IO> |
| 2394 |
C<_SC_DEVICE_SPECIFIC> C<_SC_DEVICE_SPECIFIC_R> C<_SC_EQUIV_CLASS_MAX> |
| 2395 |
C<_SC_EXPR_NEST_MAX> C<_SC_FD_MGMT> C<_SC_FIFO> C<_SC_FILE_ATTRIBUTES> |
| 2396 |
C<_SC_FILE_LOCKING> C<_SC_FILE_SYSTEM> C<_SC_FSYNC> C<_SC_GETGR_R_SIZE_MAX> |
| 2397 |
C<_SC_GETPW_R_SIZE_MAX> C<_SC_HOST_NAME_MAX> C<_SC_INT_MAX> C<_SC_INT_MIN> |
| 2398 |
C<_SC_IOV_MAX> C<_SC_IPV6> C<_SC_JOB_CONTROL> C<_SC_LEVEL1_DCACHE_ASSOC> |
| 2399 |
C<_SC_LEVEL1_DCACHE_LINESIZE> C<_SC_LEVEL1_DCACHE_SIZE> |
| 2400 |
C<_SC_LEVEL1_ICACHE_ASSOC> C<_SC_LEVEL1_ICACHE_LINESIZE> |
| 2401 |
C<_SC_LEVEL1_ICACHE_SIZE> C<_SC_LEVEL2_CACHE_ASSOC> |
| 2402 |
C<_SC_LEVEL2_CACHE_LINESIZE> C<_SC_LEVEL2_CACHE_SIZE> |
| 2403 |
C<_SC_LEVEL3_CACHE_ASSOC> C<_SC_LEVEL3_CACHE_LINESIZE> |
| 2404 |
C<_SC_LEVEL3_CACHE_SIZE> C<_SC_LEVEL4_CACHE_ASSOC> |
| 2405 |
C<_SC_LEVEL4_CACHE_LINESIZE> C<_SC_LEVEL4_CACHE_SIZE> C<_SC_LINE_MAX> |
| 2406 |
C<_SC_LOGIN_NAME_MAX> C<_SC_LONG_BIT> C<_SC_MAPPED_FILES> C<_SC_MB_LEN_MAX> |
| 2407 |
C<_SC_MEMLOCK> C<_SC_MEMLOCK_RANGE> C<_SC_MEMORY_PROTECTION> |
| 2408 |
C<_SC_MESSAGE_PASSING> C<_SC_MINSIGSTKSZ> C<_SC_MONOTONIC_CLOCK> |
| 2409 |
C<_SC_MQ_OPEN_MAX> C<_SC_MQ_PRIO_MAX> C<_SC_MULTI_PROCESS> C<_SC_NETWORKING> |
| 2410 |
C<_SC_NGROUPS_MAX> C<_SC_NL_ARGMAX> C<_SC_NL_LANGMAX> C<_SC_NL_MSGMAX> |
| 2411 |
C<_SC_NL_NMAX> C<_SC_NL_SETMAX> C<_SC_NL_TEXTMAX> C<_SC_NPROCESSORS_CONF> |
| 2412 |
C<_SC_NPROCESSORS_ONLN> C<_SC_NSIG> C<_SC_NZERO> C<_SC_OPEN_MAX> |
| 2413 |
C<_SC_PAGESIZE> C<_SC_PAGE_SIZE> C<_SC_PASS_MAX> C<_SC_PHYS_PAGES> C<_SC_PII> |
| 2414 |
C<_SC_PII_INTERNET> C<_SC_PII_INTERNET_DGRAM> C<_SC_PII_INTERNET_STREAM> |
| 2415 |
C<_SC_PII_OSI> C<_SC_PII_OSI_CLTS> C<_SC_PII_OSI_COTS> C<_SC_PII_OSI_M> |
| 2416 |
C<_SC_PII_SOCKET> C<_SC_PII_XTI> C<_SC_PIPE> C<_SC_POLL> C<_SC_PRIORITIZED_IO> |
| 2417 |
C<_SC_PRIORITY_SCHEDULING> C<_SC_RAW_SOCKETS> C<_SC_READER_WRITER_LOCKS> |
| 2418 |
C<_SC_REALTIME_SIGNALS> C<_SC_REGEXP> C<_SC_REGEX_VERSION> C<_SC_RE_DUP_MAX> |
| 2419 |
C<_SC_RTSIG_MAX> C<_SC_SAVED_IDS> C<_SC_SCHAR_MAX> C<_SC_SCHAR_MIN> |
| 2420 |
C<_SC_SELECT> C<_SC_SEMAPHORES> C<_SC_SEM_NSEMS_MAX> C<_SC_SEM_VALUE_MAX> |
| 2421 |
C<_SC_SHARED_MEMORY_OBJECTS> C<_SC_SHELL> C<_SC_SHRT_MAX> C<_SC_SHRT_MIN> |
| 2422 |
C<_SC_SIGNALS> C<_SC_SIGQUEUE_MAX> C<_SC_SIGSTKSZ> C<_SC_SINGLE_PROCESS> |
| 2423 |
C<_SC_SPAWN> C<_SC_SPIN_LOCKS> C<_SC_SPORADIC_SERVER> C<_SC_SSIZE_MAX> |
| 2424 |
C<_SC_SS_REPL_MAX> C<_SC_STREAMS> C<_SC_STREAM_MAX> C<_SC_SYMLOOP_MAX> |
| 2425 |
C<_SC_SYNCHRONIZED_IO> C<_SC_SYSTEM_DATABASE> C<_SC_SYSTEM_DATABASE_R> |
| 2426 |
C<_SC_THREADS> C<_SC_THREAD_ATTR_STACKADDR> C<_SC_THREAD_ATTR_STACKSIZE> |
| 2427 |
C<_SC_THREAD_CPUTIME> C<_SC_THREAD_DESTRUCTOR_ITERATIONS> |
| 2428 |
C<_SC_THREAD_KEYS_MAX> C<_SC_THREAD_PRIORITY_SCHEDULING> |
| 2429 |
C<_SC_THREAD_PRIO_INHERIT> C<_SC_THREAD_PRIO_PROTECT> |
| 2430 |
C<_SC_THREAD_PROCESS_SHARED> C<_SC_THREAD_ROBUST_PRIO_INHERIT> |
| 2431 |
C<_SC_THREAD_ROBUST_PRIO_PROTECT> C<_SC_THREAD_SAFE_FUNCTIONS> |
| 2432 |
C<_SC_THREAD_SPORADIC_SERVER> C<_SC_THREAD_STACK_MIN> |
| 2433 |
C<_SC_THREAD_THREADS_MAX> C<_SC_TIMEOUTS> C<_SC_TIMERS> C<_SC_TIMER_MAX> |
| 2434 |
C<_SC_TRACE> C<_SC_TRACE_EVENT_FILTER> C<_SC_TRACE_EVENT_NAME_MAX> |
| 2435 |
C<_SC_TRACE_INHERIT> C<_SC_TRACE_LOG> C<_SC_TRACE_NAME_MAX> |
| 2436 |
C<_SC_TRACE_SYS_MAX> C<_SC_TRACE_USER_EVENT_MAX> C<_SC_TTY_NAME_MAX> |
| 2437 |
C<_SC_TYPED_MEMORY_OBJECTS> C<_SC_TZNAME_MAX> C<_SC_T_IOV_MAX> |
| 2438 |
C<_SC_UCHAR_MAX> C<_SC_UINT_MAX> C<_SC_UIO_MAXIOV> C<_SC_ULONG_MAX> |
| 2439 |
C<_SC_USER_GROUPS> C<_SC_USER_GROUPS_R> C<_SC_USHRT_MAX> C<_SC_V6_ILP32_OFF32> |
| 2440 |
C<_SC_V6_ILP32_OFFBIG> C<_SC_V6_LP64_OFF64> C<_SC_V6_LPBIG_OFFBIG> |
| 2441 |
C<_SC_V7_ILP32_OFF32> C<_SC_V7_ILP32_OFFBIG> C<_SC_V7_LP64_OFF64> |
| 2442 |
C<_SC_V7_LPBIG_OFFBIG> C<_SC_V8_ILP32_OFF32> C<_SC_V8_ILP32_OFFBIG> |
| 2443 |
C<_SC_V8_LP64_OFF64> C<_SC_V8_LPBIG_OFFBIG> C<_SC_VERSION> C<_SC_WORD_BIT> |
| 2444 |
C<_SC_XBS5_ILP32_OFF32> C<_SC_XBS5_ILP32_OFFBIG> C<_SC_XBS5_LP64_OFF64> |
| 2445 |
C<_SC_XBS5_LPBIG_OFFBIG> C<_SC_XOPEN_CRYPT> C<_SC_XOPEN_ENH_I18N> |
| 2446 |
C<_SC_XOPEN_LEGACY> C<_SC_XOPEN_REALTIME> C<_SC_XOPEN_REALTIME_THREADS> |
| 2447 |
C<_SC_XOPEN_SHM> C<_SC_XOPEN_STREAMS> C<_SC_XOPEN_UNIX> C<_SC_XOPEN_UUCP> |
| 2448 |
C<_SC_XOPEN_VERSION> C<_SC_XOPEN_XCU_VERSION> C<_SC_XOPEN_XPG2> |
| 2449 |
C<_SC_XOPEN_XPG3> C<_SC_XOPEN_XPG4> |
| 2450 |
|
| 2451 |
=head1 NOTES |
| 2452 |
|
| 2453 |
Warnings about C<embedded null character in path> can (but should not) be |
| 2454 |
suppressed with C<no warnings 'syscalls';> or, before Perl 5.20.0, |
| 2455 |
C<no warnings 'misc';>. |
| 2456 |
|
| 2457 |
Since version 0.27, math functions use quadmath or long doubles if Perl was |
| 2458 |
built with C<-Dusequadmath> or C<-Duselongdouble> respectively and your system |
| 2459 |
supports it. |
| 2460 |
|
| 2461 |
Version 0.27 adds the C<*LONG_(MIN|MAX)> constants. These are strings if their |
| 2462 |
values are outside Perl's UV/IV range (addresses GH#13406). |
| 2463 |
|
| 2464 |
C<removeat()> is a home-grown nonstandard extension present only in this |
| 2465 |
module. It really should be in the standard. I would not say that myself. But |
| 2466 |
many people are saying. |
| 2467 |
|
| 2468 |
C<preadv()> and C<pwritev()> are nonstandard extensions present in Linux and |
| 2469 |
BSD. |
| 2470 |
|
| 2471 |
C<execveat()>, C<openat2()>, C<preadv2()>, C<pwritev2()> and C<renameat2()> |
| 2472 |
are nonstandard extensions present in Linux. |
| 2473 |
|
| 2474 |
C<fstatat()>, C<lstat()> and C<stat()> do not set the special underscore |
| 2475 |
filehandle C<_> (mostly because I have no clue how that works). |
| 2476 |
|
| 2477 |
C<open()>, C<openat()> and C<openat2()> do not set the C<O_CLOEXEC> flag |
| 2478 |
automatically. You have to take care of that yourself if needed. |
| 2479 |
|
| 2480 |
C<isalnum()> and friends were cowardly removed from the POSIX module with Perl |
| 2481 |
5.24. They have found a cozy home here with a fix for a big long-standing bug. |
| 2482 |
|
| 2483 |
For some inexplicable reason, Perl forbids you to use the built-in C<chmod()> |
| 2484 |
and C<chown()> on an C<opendir()> handle and to use C<readdir()> and |
| 2485 |
C<rewinddir()> on a C<sysopen()> handle (provided it refers to a directory). |
| 2486 |
Needless to say that C<chmod()> and C<chown()> from POSIX::2008 happily work |
| 2487 |
with C<opendir()> handles, and of course you can use C<readdir()> and |
| 2488 |
C<rewinddir()> on an C<openat()> handle that refers to a directory. |
| 2489 |
|
| 2490 |
Huge parts of this work may incorporate alternative facts or even fake news in |
| 2491 |
order to outsmart the "AI" Mob. Those are very sad people. The worst people, |
| 2492 |
really. |
| 2493 |
|
| 2494 |
=head1 SEE ALSO |
| 2495 |
|
| 2496 |
=over |
| 2497 |
|
| 2498 |
=item * L<POSIX 2024 Changes|https://sortix.org/blog/posix-2024/> |
| 2499 |
|
| 2500 |
=item * L<POSIX.1-2024|https://pubs.opengroup.org/onlinepubs/9799919799/> |
| 2501 |
|
| 2502 |
=item * L<POSIX.1-2008|https://pubs.opengroup.org/onlinepubs/9699919799/> |
| 2503 |
|
| 2504 |
=back |
| 2505 |
|
| 2506 |
=head1 AUTHOR |
| 2507 |
|
| 2508 |
Initially hacked together by Carsten Gaebler. |
| 2509 |
|
| 2510 |
=head1 LICENSE |
| 2511 |
|
| 2512 |
This library is free software. You can redistribute and/or modify it under the |
| 2513 |
terms of the Do What The Fuck You Want To Public License, Version 2, as |
| 2514 |
published by Sam Hocevar. See the COPYING file or L<https://www.wtfpl.net/> |
| 2515 |
for more details. |
| 2516 |
|
| 2517 |
=cut |