POSIX-2008
view release on metacpan or search on metacpan
lib/POSIX/2008.pod view on Meta::CPAN
=item C<catan>
(re, im) = catan(re, im);
=item C<catanh>
(re, im) = catanh(re, im);
=item C<catclose>
ret = catclose(catd);
=item C<catgets>
s = catgets(catd, set_id, msg_id, dflt_string);
=item C<catopen>
catd = catopen(name, flag);
=item C<cbrt>
y = cbrt(x);
=item C<ccos>
(re, im) = ccos(re, im);
=item C<ccosh>
(re, im) = ccosh(re, im);
=item C<ceil>
y = ceil(x);
=item C<cexp>
(re, im) = cexp(re, im);
I<New in version 0.19.>
=item C<chdir>
ret = chdir(dir);
C<dir> can be a path, a Perl file or directory handle, or a file descriptor.
I<Changed in version 0.19:> Deprecated I<fchdir> now covered by I<chdir>.
=item C<chmod>
ret = chmod(what, mode);
C<what> can be a path, a Perl file or directory handle (see L</"NOTES">), or a
file descriptor.
I<Changed in version 0.19:> Deprecated I<fchmod> now covered by I<chmod>.
=item C<chown>
ret = chown(what, uid, gid);
C<what> can be a path, a Perl file or directory handle (see L</"NOTES">), or a
file descriptor.
I<Changed in version 0.19:> Deprecated I<fchown> now covered by I<chown>.
=item C<cimag>
im = cimag(re, im);
=item C<clock>
t = clock()
I<New in version 0.08.>
=item C<clock_getcpuclockid>
clock_id = clock_getcpuclockid(pid);
I<pid> defaults to 0. Returns undef on error.
=item C<clock_getres>
(sec, nsec) = clock_getres(clock_id);
floating_sec = clock_getres(clock_id);
I<clock_id> defaults to C<CLOCK_REALTIME>. Returns empty list or undef on
error.
I<Changed in version 0.25:> Return floating seconds in scalar context.
=item C<clock_gettime>
(sec, nsec) = clock_gettime(clock_id);
floating_sec = clock_gettime(clock_id);
clock_id defaults to C<CLOCK_REALTIME>. Returns empty list or undef on error.
I<Changed in version 0.25:> Return floating seconds in scalar context.
=item C<clock_nanosleep>
(rem_sec, rem_nsec) = clock_nanosleep(clock_id, flags, floating_sec);
floating_rem_sec = clock_nanosleep(clock_id, flags, floating_sec);
(rem_sec, rem_nsec) = clock_nanosleep(clock_id, flags, sec, nsec);
floating_rem_sec = clock_nanosleep(clock_id, flags, sec, nsec);
Returns zero(es) on success, the remaining time on EINTR, the empty list or
undef otherwise. The remaining time is zero if the flag C<TIMER_ABSTIME> is
set.
I<Changed in version 0.25:> Sleep time can be floating seconds only or seconds
and nanoseconds.
=item C<clock_settime>
ret = clock_settime(clock_id, sec, nsec);
ret = clock_settime(clock_id, floating_sec);
I<Changed in version 0.25:> Time can be floating seconds only or seconds and
nanoseconds.
=item C<clog>
lib/POSIX/2008.pod view on Meta::CPAN
=item C<execveat>
execveat(dirfd, path, args, env=undef, flags=0);
The C<execveat()> system call is a nonstandard extension present in Linux.
See also L<C<fexecve()>|"fexecve">.
It executes the program referred to by I<path>, which is interpreted relative
to I<dirfd> as with the other I<*at> functions, passing I<args> as its
command-line arguments and optionally I<env> as its environment.
I<args> must be an array reference and, by convention, I<args-E<gt>[0]> should
be the name of the program being executed.
I<env> must be a hash reference. If omitted or undef, the environment of the
calling proces is used (which you can manipulate via C<%ENV>).
I<flags> is a bit mask that can include zero or more of the flags
C<AT_EMPTY_PATH>, C<AT_SYMLINK_NOFOLLOW>.
I<path> is executed "as is", i.e. no C<PATH> search or interpretation of shell
metacharacters takes place as opposed to Perl's built-in
L<C<exec>|perlfunc/exec>.
Returns undef on error, otherwise it doesn't return.
Usage example:
sysopen my $dh, '/usr', O_DIRECTORY|O_PATH;
execveat($dh, 'bin/date', [qw(date +%T)], {TZ => 'UTC'}, AT_SYMLINK_NOFOLLOW);
I<New in version 0.22.>
=item C<exp>
y = exp(x);
=item C<exp2>
y = exp2(x);
=item C<expm1>
y = expm1(x);
=item C<faccessat>
ret = faccessat(dirfd, path, amode, flags=0);
I<flags> is the bitwise OR of zero or more of C<AT_EACCESS>,
C<AT_SYMLINK_NOFOLLOW>.
=item C<fchmodat>
ret = fchmodat(dirfd, path, mode, flags=0);
I<flags> can be 0 or C<AT_SYMLINK_NOFOLLOW>. Your system might support a
different set of flags.
=item C<fchownat>
ret = fchownat(dirfd, path, uid, gid, flags=0);
I<flags> can be 0 or C<AT_SYMLINK_NOFOLLOW>. Your system might support a
different set of flags.
=item C<fdatasync>
ret = fdatasync(fd);
=item C<fdopen>
ret = fdopen(fd, mode);
Returns a file handle associated with the numeric file descriptor I<fd> or
undef on error. I<mode> is one of the values C<"r">, C<"w">, C<"a"> with an
optional C<"+"> and/or C<"b">.
The file descriptor is not dup'ed and will be closed when the handle is closed.
It's similar to C<IO::Handle::new_from_fd()> with the following improvements:
=over
=item *
It I<really> calls C<fdopen(3)>.
=item *
It expects POSIX mode strings (e.g. C<"r">, not C<"<">).
=item *
It fails if I<mode> is not compatible with the flags of I<fd>.
=back
Usage example:
my $fh = do {
opendir my $dh, '.';
fdopen(POSIX::dup(fileno $dh), 'r');
};
chmod 0700, $fh; # this would fail with $dh from opendir
I<New in version 0.05.>
I<Changed in version 0.22:> I<fd> can no longer be a handle (that was a wrong
turn).
=item C<fdopendir>
ret = fdopendir(fd);
Returns a directory handle associated with the numeric file descriptor I<fd>
or undef on error.
The file descriptor is not dup'ed and will be closed when the handle is closed.
Usage example:
my $dh = do {
sysopen my $fh, '/tmp', O_RDONLY|O_DIRECTORY|O_NOFOLLOW;
fdopendir(POSIX::dup(fileno $fh));
lib/POSIX/2008.pod view on Meta::CPAN
=item C<ispunct>
ret = ispunct(charstring);
Like POSIX::ispunct() but returns 0 for the empty string.
=item C<isspace>
ret = isspace(charstring);
Like POSIX::isspace() but returns 0 for the empty string.
=item C<isunordered>
ret = isunordered(x, y);
I<New in version 0.20.>
=item C<isupper>
ret = isupper(charstring);
Like POSIX::isupper() but returns 0 for the empty string.
=item C<isxdigit>
ret = isxdigit(charstring);
Like POSIX::isxdigit() but returns 0 for the empty string.
=item C<j0>
y = j0(x);
C<j0()> is the Bessel function of the first kind of order 0.
=item C<j1>
y = j1(x);
C<j1()> is the Bessel function of the first kind of order 1.
=item C<jn>
y = jn(n, x);
C<jn()> is the Bessel function of the first kind of order I<n>.
=item C<jrand48>
(r, X0, X1, X2) = jrand48(X0, X1, X2);
=item C<killpg>
ret = killpg(pgrp, sig);
=item C<l64a>
s = l64a(n);
=item C<lchown>
ret = lchown(path, uid, gid);
I<New in version 0.08.>
=item C<ldexp>
y = ldexp(x, exp);
=item C<lgamma>
y = lgamma(x);
=item C<link>
ret = link(path1, path2);
=item C<linkat>
ret = linkat(fd1, path1, fd2, path2, flags=0);
I<flags> can be 0 or C<AT_SYMLINK_FOLLOW>. Your system might support a
different set of flags.
=item C<log>
y = log(x);
=item C<log10>
y = log10(x);
=item C<log1p>
y = log1p(x);
=item C<log2>
y = log2(x);
=item C<logb>
y = logb(x);
=item C<lrand48>
r = lrand48();
=item C<lround>
l = lround(x);
Calls C<llround()> or C<lround()> whichever is the maximum available on your
system. If the rounded value is outside Perl's internal signed integer range,
it is returned as a string. If the rounded value is too large to be stored in
a long long or long, undef is returned.
=item C<lstat>
(dev, ino, mode, nlink, uid, gid, rdev, size, atim_sec, mtim_sec, ctim_sec,
blksize, blocks, atim_nsec, mtim_nsec, ctim_nsec) = lstat(path);
lib/POSIX/2008.pod view on Meta::CPAN
C<_SC_PII_OSI> C<_SC_PII_OSI_CLTS> C<_SC_PII_OSI_COTS> C<_SC_PII_OSI_M>
C<_SC_PII_SOCKET> C<_SC_PII_XTI> C<_SC_PIPE> C<_SC_POLL> C<_SC_PRIORITIZED_IO>
C<_SC_PRIORITY_SCHEDULING> C<_SC_RAW_SOCKETS> C<_SC_READER_WRITER_LOCKS>
C<_SC_REALTIME_SIGNALS> C<_SC_REGEXP> C<_SC_REGEX_VERSION> C<_SC_RE_DUP_MAX>
C<_SC_RTSIG_MAX> C<_SC_SAVED_IDS> C<_SC_SCHAR_MAX> C<_SC_SCHAR_MIN>
C<_SC_SELECT> C<_SC_SEMAPHORES> C<_SC_SEM_NSEMS_MAX> C<_SC_SEM_VALUE_MAX>
C<_SC_SHARED_MEMORY_OBJECTS> C<_SC_SHELL> C<_SC_SHRT_MAX> C<_SC_SHRT_MIN>
C<_SC_SIGNALS> C<_SC_SIGQUEUE_MAX> C<_SC_SIGSTKSZ> C<_SC_SINGLE_PROCESS>
C<_SC_SPAWN> C<_SC_SPIN_LOCKS> C<_SC_SPORADIC_SERVER> C<_SC_SSIZE_MAX>
C<_SC_SS_REPL_MAX> C<_SC_STREAMS> C<_SC_STREAM_MAX> C<_SC_SYMLOOP_MAX>
C<_SC_SYNCHRONIZED_IO> C<_SC_SYSTEM_DATABASE> C<_SC_SYSTEM_DATABASE_R>
C<_SC_THREADS> C<_SC_THREAD_ATTR_STACKADDR> C<_SC_THREAD_ATTR_STACKSIZE>
C<_SC_THREAD_CPUTIME> C<_SC_THREAD_DESTRUCTOR_ITERATIONS>
C<_SC_THREAD_KEYS_MAX> C<_SC_THREAD_PRIORITY_SCHEDULING>
C<_SC_THREAD_PRIO_INHERIT> C<_SC_THREAD_PRIO_PROTECT>
C<_SC_THREAD_PROCESS_SHARED> C<_SC_THREAD_ROBUST_PRIO_INHERIT>
C<_SC_THREAD_ROBUST_PRIO_PROTECT> C<_SC_THREAD_SAFE_FUNCTIONS>
C<_SC_THREAD_SPORADIC_SERVER> C<_SC_THREAD_STACK_MIN>
C<_SC_THREAD_THREADS_MAX> C<_SC_TIMEOUTS> C<_SC_TIMERS> C<_SC_TIMER_MAX>
C<_SC_TRACE> C<_SC_TRACE_EVENT_FILTER> C<_SC_TRACE_EVENT_NAME_MAX>
C<_SC_TRACE_INHERIT> C<_SC_TRACE_LOG> C<_SC_TRACE_NAME_MAX>
C<_SC_TRACE_SYS_MAX> C<_SC_TRACE_USER_EVENT_MAX> C<_SC_TTY_NAME_MAX>
C<_SC_TYPED_MEMORY_OBJECTS> C<_SC_TZNAME_MAX> C<_SC_T_IOV_MAX>
C<_SC_UCHAR_MAX> C<_SC_UINT_MAX> C<_SC_UIO_MAXIOV> C<_SC_ULONG_MAX>
C<_SC_USER_GROUPS> C<_SC_USER_GROUPS_R> C<_SC_USHRT_MAX> C<_SC_V6_ILP32_OFF32>
C<_SC_V6_ILP32_OFFBIG> C<_SC_V6_LP64_OFF64> C<_SC_V6_LPBIG_OFFBIG>
C<_SC_V7_ILP32_OFF32> C<_SC_V7_ILP32_OFFBIG> C<_SC_V7_LP64_OFF64>
C<_SC_V7_LPBIG_OFFBIG> C<_SC_VERSION> C<_SC_WORD_BIT> C<_SC_XBS5_ILP32_OFF32>
C<_SC_XBS5_ILP32_OFFBIG> C<_SC_XBS5_LP64_OFF64> C<_SC_XBS5_LPBIG_OFFBIG>
C<_SC_XOPEN_CRYPT> C<_SC_XOPEN_ENH_I18N> C<_SC_XOPEN_LEGACY>
C<_SC_XOPEN_REALTIME> C<_SC_XOPEN_REALTIME_THREADS> C<_SC_XOPEN_SHM>
C<_SC_XOPEN_STREAMS> C<_SC_XOPEN_UNIX> C<_SC_XOPEN_VERSION>
C<_SC_XOPEN_XCU_VERSION> C<_SC_XOPEN_XPG2> C<_SC_XOPEN_XPG3> C<_SC_XOPEN_XPG4>
=head1 NOTES
C<removeat()> is a home-grown nonstandard extension present only in this
module.
C<preadv()> and C<pwritev()> are nonstandard extensions present in Linux and
BSD.
C<execveat()>, C<openat2()>, C<preadv2()>, C<pwritev2()> and C<renameat2()>
are nonstandard extensions present in Linux.
C<fstatat()>, C<lstat()> and C<stat()> do not set the special underscore
filehandle C<_> (mostly because I have no clue how that works).
C<open()>, C<openat()> and C<openat2()> do not set the C<O_CLOEXEC> flag
automatically. You have to take care of that yourself if needed.
C<isalnum()> and friends were cowardly removed from the POSIX module with Perl
5.24.0. They have found a cozy home here with a fix for a long-standing bug.
C<SEEK_DATA> and C<SEEK_HOLE> were added to C<unistd.h> in
L<POSIX.1-2024|https://pubs.opengroup.org/onlinepubs/9799919799/> (Issue
8). Before that, they were nonstandard extensions present in Linux, Solaris,
FreeBSD, and DragonFly BSD.
For some inexplicable reason, Perl forbids you to use the built-in C<chmod()>
and C<chown()> on an C<opendir()> handle and to use C<readdir()> and
C<rewinddir()> on a C<sysopen()> handle (provided it refers to a directory).
Needless to say that C<chmod()> and C<chown()> from POSIX::2008 happily work
with C<opendir()> handles, and of course you can use C<readdir()> and
C<rewinddir()> on an C<openat()> handle that refers to a directory.
=head1 AUTHOR
Initially hacked together by Carsten Gaebler.
=head1 LICENSE
This library is free software. You can redistribute and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2, as
published by Sam Hocevar. See the COPYING file or L<http://www.wtfpl.net/> for
more details.
=cut
( run in 0.585 second using v1.01-cache-2.11-cpan-5511b514fd6 )