summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/POSIX.pod
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-03-10 21:56:14 +0000
committerKarl Berry <karl@freefriends.org>2019-03-10 21:56:14 +0000
commite0a2a718e89f9700d627f1e6a8eea8f21d2fbeb8 (patch)
tree39972f65008b0d70f306a5f976494d29411bc41e /Master/tlpkg/tlperl/lib/POSIX.pod
parentb206fdc77d81ed1600949062f08de5690a4bf66f (diff)
tl19 perl 5.28.1 for Windows, from Siep
git-svn-id: svn://tug.org/texlive/trunk@50322 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/POSIX.pod')
-rw-r--r--Master/tlpkg/tlperl/lib/POSIX.pod75
1 files changed, 65 insertions, 10 deletions
diff --git a/Master/tlpkg/tlperl/lib/POSIX.pod b/Master/tlpkg/tlperl/lib/POSIX.pod
index d3f9e8934f7..a319b0df3a3 100644
--- a/Master/tlpkg/tlperl/lib/POSIX.pod
+++ b/Master/tlpkg/tlperl/lib/POSIX.pod
@@ -24,7 +24,7 @@ interfaces.
This document gives a condensed list of the features available in the POSIX
module. Consult your operating system's manpages for general information on
most features. Consult L<perlfunc> for functions which are noted as being
-identical to Perl's builtin functions.
+identical or almost identical to Perl's builtin functions.
The first section describes POSIX functions from the 1003.1 specification.
The second section describes some classes for signal objects, TTY objects,
@@ -81,8 +81,13 @@ if the handler does not return normally (it e.g. does a C<longjmp>).
=item C<abs>
-This is identical to Perl's builtin C<abs()> function, returning
-the absolute value of its numerical argument.
+This is identical to Perl's builtin C<abs()> function, returning the absolute
+value of its numerical argument (except that C<POSIX::abs()> must be provided
+an explicit value (rather than relying on an implicit C<$_>):
+
+ $absolute_value = POSIX::abs(42); # good
+
+ $absolute_value = POSIX::abs(); # throws exception
=item C<access>
@@ -110,8 +115,13 @@ L<Math::Trig>.
=item C<alarm>
-This is identical to Perl's builtin C<alarm()> function,
-either for arming or disarming the C<SIGARLM> timer.
+This is identical to Perl's builtin C<alarm()> function, either for arming or
+disarming the C<SIGARLM> timer, except that C<POSIX::alarm()> must be provided
+an explicit value (rather than relying on an implicit C<$_>):
+
+ POSIX::alarm(3) # good
+
+ POSIX::alarm() # throws exception
=item C<asctime>
@@ -203,13 +213,27 @@ integer value greater than or equal to the given numerical argument.
=item C<chdir>
-This is identical to Perl's builtin C<chdir()> function, allowing
-one to change the working (default) directory, see L<perlfunc/chdir>.
+This is identical to Perl's builtin C<chdir()> function, allowing one to
+change the working (default) directory -- see L<perlfunc/chdir> -- with the
+exception that C<POSIX::chdir()> must be provided an explicit value (rather
+than relying on an implicit C<$_>):
+
+ $rv = POSIX::chdir('path/to/dir'); # good
+
+ $rv = POSIX::chdir(); # throws exception
=item C<chmod>
This is identical to Perl's builtin C<chmod()> function, allowing
-one to change file and directory permissions, see L<perlfunc/chmod>.
+one to change file and directory permissions -- see L<perlfunc/chmod> -- with
+the exception that C<POSIX::chmod()> can only change one file at a time
+(rather than a list of files):
+
+ $c = chmod 0664, $file1, $file2; # good
+
+ $c = POSIX::chmod 0664, $file1; # throws exception
+
+ $c = POSIX::chmod 0664, $file1, $file2; # throws exception
=item C<chown>
@@ -915,6 +939,14 @@ containing the current underlying locale's formatting values. Users of this fun
should also read L<perllocale>, which provides a comprehensive
discussion of Perl locale handling, including
L<a section devoted to this function|perllocale/The localeconv function>.
+Prior to Perl 5.28, or when operating in a non thread-safe environment,
+it should not be used in a threaded application unless it's certain that
+the underlying locale is C or POSIX. This is because it otherwise
+changes the locale, which globally affects all threads simultaneously.
+Windows platforms starting with Visual Studio 2005 are mostly
+thread-safe, but use of this function in those prior to Visual Studio
+2015 can interefere with a thread that has called
+L<perlapi/switch_to_global_locale>.
Here is how to query the database for the B<de> (Deutsch or German) locale.
@@ -958,7 +990,15 @@ POSIX.1-2008 and are only available on systems that support them.
=item C<localtime>
This is identical to Perl's builtin C<localtime()> function for
-converting seconds since the epoch to a date see L<perlfunc/localtime>.
+converting seconds since the epoch to a date see L<perlfunc/localtime> except
+that C<POSIX::localtime()> must be provided an explicit value (rather than
+relying on an implicit C<$_>):
+
+ @localtime = POSIX::localtime(time); # good
+
+ @localtime = localtime(); # good
+
+ @localtime = POSIX::localtime(); # throws exception
=item C<log>
@@ -1772,7 +1812,10 @@ may not check for overflow, and therefore will never set C<$!>.
C<strtod> respects any POSIX C<setlocale()> C<LC_TIME> settings,
regardless of whether or not it is called from Perl code that is within
-the scope of S<C<use locale>>.
+the scope of S<C<use locale>>. This means it should not be used in a
+threaded application unless it's certain that the underlying locale is C
+or POSIX. This is because it otherwise changes the locale, which
+globally affects all threads simultaneously.
To parse a string C<$str> as a floating point number use
@@ -2433,6 +2476,18 @@ C<_POSIX_TZNAME_MAX> C<_POSIX_VDISABLE> C<_POSIX_VERSION>
=back
+=head1 RESOURCE CONSTANTS
+
+Imported with the C<:sys_resource_h> tag.
+
+=over 8
+
+=item Constants
+
+C<PRIO_PROCESS> C<PRIO_PGRP> C<PRIO_USER>
+
+=back
+
=head1 SYSTEM CONFIGURATION
=over 8