1POSIX::2008(3) User Contributed Perl Documentation POSIX::2008(3)
2
3
4
6 POSIX::2008 - Perl interface to POSIX.1-2008
7
9 use Fcntl;
10 use POSIX::2008 qw(openat pwrite);
11
12 sysopen my $dh, '/tmp', O_RDONLY|O_DIRECTORY|O_NOFOLLOW or die 'Dafuq?';
13 my $fh = openat($dh, 'foobar', O_RDWR|O_CREAT);
14 pwrite($fh, 'fuckyounsa', 10, 0);
15
17 POSIX::2008 contains many of the interfaces specified by POSIX.1-2008
18 <http://pubs.opengroup.org/onlinepubs/9699919799/> that the core POSIX
19 module withholds, implements in Perl or fucked up.
20
21 This module is provided "as is" unless someone volunteers to maintain
22 it.
23
25 Since version 0.13, the parameter order of pread/pwrite is (count,
26 offset) as with the actual system calls instead of (offset, count).
27 Good luck.
28
30 Since version 0.05, all I/O functions that take numeric file
31 descriptors also accept Perl file or directory handles. "openat()" even
32 returns a handle if you passed it one.
33
35 A system call return value of -1 meaning "error" is mapped to undef.
36
37 A system call return value of 0 meaning "success" is mapped to "0 but
38 true".
39
40 For system calls where 0 does not just mean "success", 0 is returned
41 unchanged. These are "open()", "read()", "write()", "readv()",
42 "writev()", "pread()", "pwrite()", "preadv()", "pwritev()". "openat()"
43 gets a special treatment in this module, see below.
44
46 a64l
47 l = a64l(s);
48
49 abort
50 abort();
51
52 abs ui = abs(i);
53
54 access
55 ret = access(path, mode);
56
57 acos
58 y = acos(x);
59
60 acosh
61 y = acosh(x);
62
63 alarm
64 remaining_sec = alarm(sec);
65
66 asin
67 y = asin(x);
68
69 asinh
70 y = asinh(x);
71
72 atan2
73 z = atan2(y, x);
74
75 atan
76 y = atan(x);
77
78 atanh
79 y = atanh(x);
80
81 atof
82 f = atof(s);
83
84 atoi
85 i = atoi(s);
86
87 atol
88 l = atol(s);
89
90 basename
91 s = basename(path);
92
93 cabs
94 r = cabs(re, im);
95
96 cacos
97 (re, im) = cacos(re, im);
98
99 cacosh
100 (re, im) = cacosh(re, im);
101
102 carg
103 phi = carg(re, im);
104
105 casinh
106 (re, im) = casinh(re, im);
107
108 catan
109 (re, im) = catan(re, im);
110
111 catanh
112 (re, im) = catanh(re, im);
113
114 catclose
115 ret = catclose(catd);
116
117 catgets
118 s = catgets(catd, set_id, msg_id, dflt_string);
119
120 catopen
121 catd = catopen(name, oflag);
122
123 cbrt
124 y = cbrt(x);
125
126 ccos
127 (re, im) = ccos(re, im);
128
129 ccosh
130 (re, im) = ccosh(re, im);
131
132 ceil
133 y = ceil(x);
134
135 cexp
136 (re, im) = cexp(re, im);
137
138 chdir
139 ret = chdir(path);
140
141 chmod
142 ret = chmod(path, mode);
143
144 chown
145 ret = chown(path, uid, gid);
146
147 cimag
148 im = cimag(re, im);
149
150 clock
151 t = clock()
152
153 clock_getcpuclockid
154 clock_id = clock_getcpuclockid(pid);
155
156 pid defaults to $$. Returns undef on error.
157
158 clock_getres
159 (sec, nsec) = clock_getres(clock_id);
160
161 clock_id defaults to CLOCK_REALTIME. Returns empty list on error.
162
163 clock_gettime
164 (sec, nsec) = clock_gettime(clock_id);
165
166 clock_id defaults to CLOCK_REALTIME. Returns empty list on error.
167
168 clock_nanosleep
169 (rem_sec, rem_nsec) = clock_nanosleep(clock_id, flags, sec, nsec);
170
171 In scalar context returns the remaining seconds as a floating point
172 number.
173
174 clock_settime
175 ret = clock_settime(clock_id, sec, nsec);
176
177 clog
178 (re, im) = clog(re, im);
179
180 close
181 ret = close(fd);
182
183 confstr
184 s = confstr(name);
185
186 name is one of the _CS_ integer constants.
187
188 conj
189 (re, im) = conj(re, im);
190
191 copysign
192 xs = copysign(x, y);
193
194 cos y = cos(x);
195
196 cosh
197 y = cosh(x);
198
199 cpow
200 (re, im) = cpow(re_x, im_x, re_y, im_y);
201
202 cproj
203 (re, im) = cproj(re, im);
204
205 creal
206 re = creal(re, im);
207
208 csin
209 (re, im) = csin(re, im);
210
211 csinh
212 (re, im) = csinh(re, im);
213
214 csqrt
215 (re, im) = csqrt(re, im);
216
217 ctan
218 (re, im) = ctan(re, im);
219
220 ctanh
221 (re, im) = ctanh(re, im);
222
223 dirname
224 name = dirname(path);
225
226 div (quot, rem) = div(numer, denom);
227
228 dlclose
229 dlclose(dlhandle);
230
231 dlerror
232 dlerror();
233
234 dlopen
235 dlhandle = dlopen(file, mode);
236
237 dlsym
238 addr = dlsym(dlhandle, name);
239
240 drand48
241 r = drand48();
242
243 endutxent
244 endutxent();
245
246 erand48
247 (r, X0, X1, X2) = erand48(X0, X1, X2);
248
249 erf y = erf(x);
250
251 erfc
252 y = erfc(x);
253
254 exp2
255 y = exp2(x);
256
257 expm1
258 y = expm1(x);
259
260 faccessat
261 ret = faccessat(dirfd, path, amode, flags=0);
262
263 flags is the bitwise OR of zero or more of AT_EACCESS,
264 AT_SYMLINK_NOFOLLOW.
265
266 fchdir
267 ret = fchdir(dirfd);
268
269 fchmod
270 ret = fchmod(fd, mode);
271
272 fchmodat
273 ret = fchmodat(dirfd, path, mode, flags=0);
274
275 flags can be 0 or AT_SYMLINK_NOFOLLOW.
276
277 fchown
278 ret = fchown(fd, uid, gid);
279
280 fchownat
281 ret = fchownat(dirfd, path, uid, gid, flags=0);
282
283 flags can be 0 or AT_SYMLINK_NOFOLLOW.
284
285 fdatasync
286 ret = fdatasync(fd);
287
288 fdopen
289 ret = fdopen(fd, mode)
290
291 Returns a file handle associated with the file descriptor fd or
292 undef on error. mode is one of the values "r", "w", "a" with an
293 optional "+" and/or "b".
294
295 It's similar to "IO::Handle::new_from_fd()" with the following
296 improvements:
297
298 • It really calls fdopen(3).
299
300 • It expects POSIX mode strings (e.g. "r", not "<").
301
302 • It fails mode is not compatible with the flags of fd.
303
304 fdopendir
305 ret = fdopendir(fd)
306
307 Returns a directory handle associated with the file descriptor fd
308 or undef on error. Usage example:
309
310 my $dh = do {
311 sysopen my $fh, '/tmp', O_RDONLY|O_DIRECTORY|O_NOFOLLOW;
312 fdopendir($fh); # or fdopendir(fileno $fh) but the former also works
313 # with handles from opendir() for which fileno does
314 # not work before Perl 5.22
315 };
316 my @files = readdir $dh; # this would fail with $fh from sysopen
317
318 fdim
319 d = fdim(double x, double y);
320
321 fegetround
322 round = fegetround();
323
324 fesetround
325 ret = fesetround(round);
326
327 ffs pos = ffs(i);
328
329 floor
330 y = floor(x);
331
332 fma r = fma(x, y, z);
333
334 fmax
335 m = fmax(x, y);
336
337 fmin
338 m = fmin(x, y);
339
340 fmod
341 m = fmod(x, y);
342
343 fnmatch
344 ret = fnmatch(pattern, string, flags);
345
346 Returns 0 if string matches pattern, FNM_NOMATCH if there is no
347 match, undef if there is an error.
348
349 flags is the bitwise OR of zero or more of FNM_NOESCAPE,
350 FNM_PATHNAME, FNM_PERIOD, FNM_FILE_NAME, FNM_LEADING_DIR,
351 FNM_CASEFOLD.
352
353 fpclassify
354 fpclassify(x);
355
356 Returns one of FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL,
357 FP_NORMAL.
358
359 fstatat
360 (dev, ino, mode, nlink, uid, gid, rdev, size, atim_sec, mtim_sec,
361 ctim_sec, blksize, blocks, atim_nsec, mtim_nsec, ctim_nsec) =
362 fstatat(dirfd, path, flags = 0);
363
364 flags is the bitwise OR of zero or more of AT_SYMLINK_NOFOLLOW,
365 AT_NO_AUTOMOUNT.
366
367 fsync
368 ret = fsync(fd);
369
370 ftruncate
371 ret = ftruncate(fd, length);
372
373 futimens
374 ret = futimens(fd, atime_sec, atime_nsec, mtime_sec, mtime_nsec);
375
376 atime_sec and mtime_sec default to 0, atime_nsec and mtime_nsec
377 default to UTIME_NOW.
378
379 getdate
380 (sec, min, hour, mday, mon, year, wday, yday, isdst) =
381 getdate(string);
382
383 getdate_err
384 getdate_err() returns the value of the getdate_err variable.
385
386 getegid
387 egid = getegid();
388
389 geteuid
390 euid = geteuid();
391
392 getgid
393 gid = getgid();
394
395 gethostid
396 hostid = gethostid();
397
398 gethostname
399 hostname = gethostname();
400
401 getitimer
402 (int_sec, int_usec, val_sec, val_usec) = getitimer(which);
403
404 which is one of ITIMER_REAL, ITIMER_VIRTUAL, ITIMER_PROF.
405
406 getpriority
407 prio = getpriority(which, who);
408
409 which can be one of PRIO_PROCESS, PRIO_PGRP, PRIO_USER, defaults to
410 PRIO_PROCESS.
411
412 who defaults to 0.
413
414 Returns undef on error.
415
416 getsid
417 sid = getsid(pid);
418
419 pid defaults to 0.
420
421 getuid
422 uid = getuid();
423
424 getutxent
425 (user, id, line, pid, type, sec, usec) = getutxent();
426
427 getutxent() reads a line from the current file position in the utmp
428 file.
429
430 getutxid
431 (user, id, line, pid, type, sec, usec) = getutxid(ut_type, ut_id);
432
433 getutxid() searches forward from the current file position in the
434 utmp file based upon ut_type and ut_id. If ut_type is one of
435 RUN_LVL, BOOT_TIME, NEW_TIME, or OLD_TIME, getutxid() will find the
436 first entry whose ut_type field matches ut_type. If ut_type is one
437 of INIT_PROCESS, LOGIN_PROCESS, USER_PROCESS, or DEAD_PROCESS,
438 getutxid() will find the first entry whose ut_id field matches
439 ut_id.
440
441 getutxline
442 (user, id, line, pid, type, sec, usec) = getutxline(ut_line);
443
444 getutxline() searches forward from the current file position in the
445 utmp file. It scans entries whose ut_type is USER_PROCESS or
446 LOGIN_PROCESS and returns the first one whose ut_line field matches
447 ut_line.
448
449 hypot
450 r = hypot(x, y);
451
452 ilogb
453 y = ilogb(x);
454
455 isalpha
456 Like POSIX::isalpha() but returns 0 for the empty string.
457
458 isatty
459 ret = isatty(fd)
460
461 isblank
462 ret = isblank(charstring)
463
464 Returns 1 if charstring consists only of blank characters (i.e.
465 spaces and/or tabs). Returns 0 otherwise (also for the empty
466 string).
467
468 iscntrl
469 Like POSIX::iscntrl() but returns 0 for the empty string.
470
471 isdigit
472 Like POSIX::isdigit() but returns 0 for the empty string.
473
474 isfinite
475 isfinite(x);
476
477 isgraph
478 Like POSIX::isgraph() but returns 0 for the empty string.
479
480 isinf
481 isinf(x);
482
483 islower
484 Like POSIX::islower() but returns 0 for the empty string.
485
486 isnan
487 isnan(x);
488
489 isnormal
490 isnormal(x);
491
492 isprint
493 Like POSIX::isprint() but returns 0 for the empty string.
494
495 ispunct
496 Like POSIX::ispunct() but returns 0 for the empty string.
497
498 isspace
499 Like POSIX::isspace() but returns 0 for the empty string.
500
501 isupper
502 Like POSIX::isupper() but returns 0 for the empty string.
503
504 isxdigit
505 Like POSIX::isxdigit() but returns 0 for the empty string.
506
507 j0 y = j0(x);
508
509 j0() is the Bessel function of the first kind of order 0.
510
511 j1 y = j1(x);
512
513 j1() is the Bessel function of the first kind of order 1.
514
515 jn y = jn(n, x);
516
517 jn() is the Bessel function of the first kind of order n.
518
519 jrand48
520 (r, X0, X1, X2) = jrand48(X0, X1, X2);
521
522 killpg
523 ret = killpg(pgrp, sig);
524
525 l64a
526 s = l64a(n);
527
528 lchown
529 ret = lchown(path, uid, gid)
530
531 ldexp
532 y = ldexp(x, exp);
533
534 ldiv
535 (quot, rem) = ldiv(numer, denom);
536
537 lgamma
538 y = lgamma(x);
539
540 link
541 ret = link(path1, path2);
542
543 linkat
544 ret = linkat(fd1, path1, fd2, path2, flags=0);
545
546 flags can be 0 or AT_SYMLINK_FOLLOW.
547
548 log1p
549 y = log1p(x);
550
551 log2
552 y = log2(x);
553
554 logb
555 y = logb(x);
556
557 lrand48
558 r = lrand48();
559
560 lround
561 l = lround(x)
562
563 lstat
564 ret = lstat(path);
565
566 mkdir
567 ret = mkdir(path, mode);
568
569 mkdirat
570 ret = mkdirat(fd, path, mode);
571
572 mkdtemp
573 name = mkdtemp(template);
574
575 mkfifo
576 ret = mkfifo(path, mode);
577
578 mkfifoat
579 ret = mkfifoat(fd, path, mode);
580
581 mknod
582 ret = mknod(path, mode, dev);
583
584 mknodat
585 ret = mknodat(fd, path, mode, dev);
586
587 mkstemp
588 (fd, name) = mkstemp(template);
589
590 mrand48
591 mrand48();
592
593 nanosleep
594 (rem_sec, rem_nsec) = nanosleep(sec, nsec);
595
596 In scalar context returns the remaining seconds as a floating point
597 number.
598
599 nearbyint
600 y = nearbyint(x);
601
602 nextafter
603 z = nextafter(x, y);
604
605 nrand48
606 r = nrand48()
607
608 open
609 ret = open(path, oflag[, mode]);
610
611 oflag defaults to O_RDONLY, mode defaults to 0600.
612
613 openat
614 ret = openat(fd, path, oflag[, mode]);
615
616 oflag defaults to O_RDONLY, mode defaults to 0600.
617
618 If fd is numeric (i.e. a file descriptor), "openat()" returns a
619 file descriptor. If fd is a file or directory handle the return
620 value is also a handle whose type depends on the file type of path:
621 If path is a directory, the return value is a directory handle,
622 otherwise it's a file handle.
623
624 Returns undef on error.
625
626 posix_fadvise
627 ret = posix_fadvise(fd, offset, len, advice);
628
629 advice is one of the "POSIX_FADV_" constants.
630
631 Returns undef on error
632
633 posix_fallocate
634 ret = posix_fallocate(fd, offset, len);
635
636 pread
637 bytes_read = pread(fd, buf, count, [offset, buf_offset]);
638
639 "pread()" reads count bytes (not characters) of data from the file
640 descriptor fd at file offset offset into the scalar buf without
641 changing the file offset. buf will be enlarged automatically if
642 necessary.
643
644 offset and buf_offset are set to 0 if omitted or undef.
645
646 "pread()" treats buf just like "sysread()" does: buf_offset may be
647 specified to place the read data at that position in buf. If
648 buf_offset is past the end of buf, buf will be padded with zeros
649 before appending the data. If buf_offset is negative, it is counted
650 from the end of the string. buf will be grown or shrunk so that the
651 last byte actually read is the last byte of buf after the read.
652
653 Returns the number of bytes read, 0 at EOF, undef on error.
654
655 preadv
656 bytes_read = preadv(fd, buffers, sizes, [offset])
657
658 "preadv()" behaves like "readv()" but adds an optional offset
659 argument, which specifies the file position at which the data is to
660 be read. offset is set to 0 if omitted or undef.
661
662 The file offset is not changed by this system call. The file
663 referred to by fd must be capable of seeking.
664
665 ptsname
666 name = ptsname(fd);
667
668 pwrite
669 bytes_written = pwrite(fd, buf, [count, offset, buf_offset]);
670
671 pwrite() writes count bytes of data from the scalar buf to the file
672 descriptor fd at file offset offset without changing the file
673 offset. The file referenced by fd must be capable of seeking.
674
675 If count is omitted or undef, everything from buf_offset up to the
676 end of buf is written.
677
678 buf_offset may be specified to write data from that position in
679 buf. If buf_offset is negative it is counted from the end of the
680 string.
681
682 offset and buf_offset are set to 0 if omitted or undef.
683
684 Returns the number of bytes written, undef on error.
685
686 On Linux, if a file is opened with O_APPEND, pwrite() appends data
687 to the end of the file, regardless of the value of offset (in
688 violation of POSIX).
689
690 pwritev
691 bytes_written = pwritev(fd, buffers, [offset])
692
693 "pwritev()" behaves like "writev()" but adds an optional offset
694 argument, which specifies the file position at which the data is to
695 be written. offset is set to 0 if omitted or undef.
696
697 The file offset is not changed by this system call. The file
698 referred to by fd must be capable of seeking.
699
700 random
701 r = random();
702
703 read
704 bytes_read = read(fd, buf, count);
705
706 Like POSIX::read() but returns 0 at EOF instead of "0 but true".
707
708 readv
709 bytes_read = readv(fd, buffers, sizes);
710
711 Example:
712
713 sysopen my $fh, '/tmp/foobar', O_RDWR|O_CREAT|O_TRUNC;
714 pwrite($fh, 'foobar', 6, 0);
715 readv($fh, my @buf, [4, 0, 4, 4]);
716 # -> @buf is ('foob', '', 'ar')
717
718 "readv()" reads from the file descriptor fd into buffers as many
719 strings as there are elements in sizes. buffers must be a variable
720 holding an array or an array reference. sizes must be an array
721 reference.
722
723 sizes is expected to hold unsigned integers that specify how many
724 bytes are to be read into each buffer. A byte count of 0 or undef
725 creates an empty string. sizes is processed in array order.
726
727 buffers will be extended if necessary, but it will never be shrunk.
728 If buffers is not empty, any existing elements are replaced as long
729 as sufficient data was read from fd.
730
731 If the total byte count of sizes exceeds the number of bytes
732 actually read from fd, there may be one partly filled buffer and
733 the rest of sizes is skipped, so you may end up with less strings
734 in buffers than there are elements in sizes.
735
736 "readv()" returns the number of bytes read (which may be less than
737 the total bytes in sizes) or undef on error.
738
739 readlink
740 name = readlink(path);
741
742 Returns undef on error.
743
744 readlinkat
745 name = readlinkat(dirfd, path);
746
747 Returns undef on error.
748
749 remainder
750 r = remainder(x, y);
751
752 remove
753 ret = remove(path);
754
755 Calls the actual C library function "remove()".
756
757 Note that POSIX::remove() fails if path is a symlink to a directory
758 because someone "couldn't read the plans right and did a piss-poor
759 job of putting it together" as "(-d $_[0]) ? CORE::rmdir($_[0]) :
760 CORE::unlink($_[0])". Quote from Armageddon.
761
762 rename
763 ret = rename(old, new);
764
765 renameat
766 ret = renameat(olddirfd, oldpath, newdirfd, newpath);
767
768 round
769 r = round(x);
770
771 scalbn
772 y = scalbn(x, n);
773
774 seed48
775 (old_seed1, old_seed2, old_seed3) = seed48(seed1, seed2, seed3);
776
777 setegid
778 ret = setegid(gid);
779
780 seteuid
781 ret = seteuid(uid);
782
783 setgid
784 ret = setgid(gid);
785
786 setitimer
787 (old_int_sec, old_int_usec, old_val_sec, old_val_usec) =
788 setitimer(which, int_sec, int_usec, val_sec, val_usec);
789
790 which is one of ITIMER_REAL, ITIMER_VIRTUAL, ITIMER_PROF.
791
792 setpriority
793 ret = setpriority(value, which, who);
794
795 which can be one of PRIO_PROCESS, PRIO_PGRP, PRIO_USER, defaults to
796 PRIO_PROCESS.
797
798 Returns true on success, undef on error.
799
800 who defaults to 0.
801
802 setregid
803 ret = setregid(rgid, egid);
804
805 setreuid
806 ret = setreuid(ruid, euid);
807
808 setuid
809 ret = setuid(uid);
810
811 setutxent
812 setutxent();
813
814 sighold
815 ret = sighold(sig);
816
817 sigignore
818 ret = sigignore(sig);
819
820 signbit
821 b = signbit(x);
822
823 sigpause
824 sigpause(sig);
825
826 sigrelse
827 ret = sigrelse(sig);
828
829 sinh
830 y = sinh(x);
831
832 srand48
833 srand48(seedval);
834
835 srandom
836 srandom(seed);
837
838 stat
839 (dev, ino, mode, nlink, uid, gid, rdev, size, atim_sec, mtim_sec,
840 ctim_sec, blksize, blocks, atim_nsec, mtim_nsec, ctim_nsec) =
841 stat(path);
842
843 strptime
844 (sec, min, hour, mday, mon, year, wday, yday, isdst) = strptime(s,
845 format[, sec, min, hour, mday, mon, year, wday, yday, isdst]);
846
847 strptime() converts the string s into a broken-down time according
848 to the format string format. The time fields may optionally be
849 initialized in whole or in part and will be returned as initialized
850 if they are not affected by the format string. Unprocessed
851 uninitialized or undef fields are returned as undef.
852
853 Returns an empty list on error.
854
855 In scalar context returns the index of the first byte in s that was
856 not processed or the byte length of s if the whole string was
857 consumed or undef on error.
858
859 As strptime() acts on null-terminated strings, strings containing
860 NUL bytes will only be processed up to the first NUL byte.
861
862 symlink
863 symlink(old, new);
864
865 symlinkat
866 ret = symlinkat(old, dirfd, new);
867
868 sync
869 sync();
870
871 tan y = tan(x);
872
873 tanh
874 y = tanh(x);
875
876 tgamma
877 y = tgamma(x);
878
879 timer_create
880 timerid = timer_create(clockid, signal);
881
882 Returns undef on error.
883
884 timer_delete
885 timer_delete(timerid);
886
887 Returns '0 but true' on success, undef on error.
888
889 timer_getoverrun
890 count = timer_getoverrun(timerid);
891
892 Returns undef on error.
893
894 timer_gettime
895 (interval_sec, interval_nsec, initial_sec, initial_nsec) =
896 timer_gettime(timerid);
897
898 Returns an empty list on error.
899
900 timer_settime
901 (old_int_sec, old_int_nsec, old_init_sec, old_init_nsec) =
902 timer_settime(timerid, flags, int_sec, int_nsec, [init_sec,
903 init_nsec]);
904
905 flags may be 0 or "TIMER_ABSTIME". If the init values are omitted,
906 they are set to the int values.
907
908 truncate
909 ret = truncate(path, length);
910
911 trunc
912 y = trunc(x);
913
914 unlinkat
915 ret = unlinkat(dirfd, path, flags=0);
916
917 flags can be 0 or AT_REMOVEDIR.
918
919 unlink
920 ret = unlink(path);
921
922 utimensat
923 ret = utimensat(dirfd, path, flags, atime_sec, atime_nsec,
924 mtime_sec, mtime_nsec);
925
926 flags can be 0 or AT_SYMLINK_NOFOLLOW, defaults to 0.
927
928 atime_sec and mtime_sec default to 0. atime_nsec and mtime_nsec
929 default to UTIME_NOW.
930
931 write
932 bytes_written = write(fd, buf[, count]);
933
934 Like POSIX::write() but returns 0 instead of "0 but true" if 0
935 bytes were written, and it does not write more bytes than buf
936 contains.
937
938 If count is omitted or undef, it defaults to the length of buf.
939
940 writev
941 bytes_written = writev(fd, buffers);
942
943 writev() writes multiple buffers from buffers to the file
944 associated with the file descriptor fd. buffers must be an array
945 reference. The buffers are processed in array order. Undefined or
946 empty elements are skipped.
947
948 Returns the number of bytes written or undef on error.
949
950 y0 y = y0(x);
951
952 y0() is the Bessel function of the second kind of order 0.
953
954 y1 y = y1(x);
955
956 y1() is the Bessel function of the second kind of order 1.
957
958 yn y = yn(n, x);
959
960 yn() is the Bessel function of the second kind of order n.
961
963 This module does not export anything by default. The following export
964 tags are available:
965
966 :at All *at() functions like openat() etc. plus all AT_ constants
967 :id All get/set*id() functions like getuid() etc.
968 :is All is* functions like isdigit() etc.
969 :rw read(), readv(), write(), writev()
970 :prw pread(), preadv(), pwrite(), pwritev()
971 :clock All clock* functions and all CLOCK* constants
972 :fcntl All F_, FD_, O_, POSIX_FADV_ and SEEK_ constants (for AT_ use :at)
973 :fnm C<fnmatch()> and all FNM_ constants
974 :time_h All CLOCK_ and TIMER_ constants
975 :timer All timer_ functions and TIMER_ constants
976
978 "AT_EACCESS" "AT_EMPTY_PATH" "AT_FDCWD" "AT_NO_AUTOMOUNT"
979 "AT_REMOVEDIR" "AT_SYMLINK_FOLLOW" "AT_SYMLINK_NOFOLLOW"
980
981 "BOOT_TIME" "NEW_TIME" "OLD_TIME" "DEAD_PROCESS" "INIT_PROCESS"
982 "LOGIN_PROCESS" "USER_PROCESS" "RUN_LVL"
983
984 "CLOCK_BOOTTIME" "CLOCK_HIGHRES" "CLOCK_MONOTONIC"
985 "CLOCK_MONOTONIC_COARSE" "CLOCK_MONOTONIC_FAST"
986 "CLOCK_MONOTONIC_PRECISE" "CLOCK_MONOTONIC_RAW"
987 "CLOCK_PROCESS_CPUTIME_ID" "CLOCK_REALTIME" "CLOCK_REALTIME_COARSE"
988 "CLOCK_REALTIME_FAST" "CLOCK_REALTIME_PRECISE" "CLOCK_SOFTTIME"
989 "CLOCK_THREAD_CPUTIME_ID" "CLOCK_UPTIME" "CLOCK_UPTIME_FAST"
990 "CLOCK_UPTIME_PRECISE"
991
992 "_CS_GNU_LIBC_VERSION" "_CS_GNU_LIBPTHREAD_VERSION" "_CS_PATH"
993
994 "F_DUPFD" "F_DUPFD_CLOEXEC" "F_GETFD" "F_SETFD" "F_GETFL" "F_SETFL"
995 "F_GETLK" "F_SETLK" "F_SETLKW" "F_GETOWN" "F_SETOWN" "F_RDLCK"
996 "F_UNLCK" "F_WRLCK"
997
998 "FD_CLOEXEC"
999
1000 "FNM_CASEFOLD" "FNM_FILE_NAME" "FNM_LEADING_DIR" "FNM_NOESCAPE"
1001 "FNM_NOMATCH" "FNM_PATHNAME" "FNM_PERIOD"
1002
1003 "FP_INFINITE" "FP_NAN" "FP_NORMAL" "FP_SUBNORMAL" "FP_ZERO"
1004
1005 "TIMER_ABSTIME" "ITIMER_PROF" "ITIMER_REAL" "ITIMER_VIRTUAL"
1006
1007 "O_ACCMODE" "O_APPEND" "O_CLOEXEC" "O_CREAT" "O_DIRECTORY" "O_DSYNC"
1008 "O_EXEC" "O_NOCTTY" "O_NOFOLLOW" "O_NONBLOCK" "O_RDONLY" "O_RDWR"
1009 "O_RSYNC" "O_SEARCH" "O_SYNC" "O_TMPFILE" "O_TRUNC" "O_TTY_INIT"
1010 "O_WRONLY"
1011
1012 "POSIX_FADV_NORMAL" "POSIX_FADV_SEQUENTIAL" "POSIX_FADV_RANDOM"
1013 "POSIX_FADV_NOREUSE" "POSIX_FADV_WILLNEED" "POSIX_FADV_DONTNEED"
1014
1015 "RTLD_GLOBAL" "RTLD_LAZY" "RTLD_LOCAL" "RTLD_NOW"
1016
1017 "SEEK_SET" "SEEK_CUR" "SEEK_END"
1018
1019 "UTIME_NOW" "UTIME_OMIT"
1020
1022 For whatever reason, "preadv()" and "pwritev()" are not part of POSIX.
1023 They are included anyway.
1024
1026 Initially hacked together by Carsten Gaebler.
1027
1029 This library is free software. You can redistribute and/or modify it
1030 under the terms of the Do What The Fuck You Want To Public License,
1031 Version 2, as published by Sam Hocevar. See the COPYING file or
1032 http://www.wtfpl.net/ for more details.
1033
1034
1035
1036perl v5.32.1 2021-01-27 POSIX::2008(3)