| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under POSIX threads the getpid() and getppid() functions return the
same values across multiple threads, i.e. threads don't have their own
PID's. This is not the case under the obsolete LinuxThreads where each
thread has a different PID, so getpid() and getppid() will return
different values across threads.
Ever since the first perl 5.0 we've returned POSIX-consistent
semantics for $$, until v5.14.0-251-g0e21945 when the getpid() cache
was removed. In 5.8.1 Rafael added further explicit POSIX emulation in
perl-5.8.0-133-g4d76a34 [1] by explicitly caching getppid(), so that
multiple threads would always return the same value.
I don't think all this effort to emulate POSIX sematics is worth it. I
think $$ and getppid() are OS-level functions that should always
return the same as their C equivalents. I shouldn't have to use a
module like Linux::Pid to get the OS version of the return values.
This is pretty much a complete non-issue in practice these days,
LinuxThreads was a Linux 2.4 thread implementation that nobody
maintains anymore[2], all modern Linux distros use NPTL threads which
don't suffer from this discrepancy. Debian GNU/kFreeBSD does use
LinuxThreads in the 6.0 release, but they too will be moving away from
it in future releases.
This caching makes it unnecessarily tedious to fork an embedded Perl
interpreter. When someone that constructs an embedded perl interpreter
and forks their application, the fork(2) system call isn't going to
run Perl_pp_fork(), and thus the return value of $$ and getppid()
doesn't reflect the current process. See [3] for a bug in uWSGI
related to this, and Perl::AfterFork for XS code that you need to run
after forking a PerlInterpreter unbeknownst to perl.
We've already been failing the tests in t/op/getpid.t on these Linux
systems that nobody apparently uses, the Debian GNU/kFreeBSD users did
notice and filed #96270, this patch fixes that failure by changing the
tests to test for different behavior under LinuxThreads, I've tested
that this works on my Debian GNU/kFreeBSD 6.0.4 box.
If this change is found to be unacceptable (i.e. we want to continue
to emulate POSIX thread semantics for the sake of LinuxThreads) we
also need to revert v5.14.0-251-g0e21945, because currently we're only
emulating POSIX semantics for getppid(), not getpid().
This commit includes a change to embedvar.h made by "make
regen_headers".
1. http://www.nntp.perl.org/group/perl.perl5.porters/2002/08/msg64603.html
2. http://pauillac.inria.fr/~xleroy/linuxthreads/
3. http://projects.unbit.it/uwsgi/ticket/85
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Merge my rebased version of Paul "LeoNerd" Evans's branch to blead
after I'd cherry-picked the unrelated a748fe1 commit out of it.
This may or may not be the perfect implementation of strptime, but it
seems to work well enough for me, the bugs that have been raised
against it have been addressed, and it's going to work a hell of a lot
better than not having any strptime support at all.
|
| | |
|
| | |
|
| |
| |
| |
| | |
the string to match; taking care to handle pos() counts both sides
|
| |
| |
| |
| | |
the string to match; taking care to handle pos() counts both sides
|
| |
| |
| |
| | |
better handle mixed UTF-8/non between str and fmt
|
| | |
|
| |
| |
| |
| | |
by sec/min/hour = -1
|
| |
| |
| |
| | |
element yields false so ... and push ... would never have worked
|
| |
| |
| |
| | |
fields in strptime(3)
|
| | |
|
| |
| |
| |
| | |
for some architectures that have extra fields
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
fields are correct
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This function assumes that there is enough space in the buffer to read
however many bytes are indicated by the first byte in the alleged UTF-8
encoded string. This may not be true, and so it can read beyond the
buffer end. is_utf8_char_buf() should be used instead.
|
|
|
|
|
|
|
|
|
|
| |
This function is to replace is_utf8_char(), and requires an extra
parameter to ensure that it doesn't read beyond the end of the buffer.
Convert is_utf8_char() and the only place in the Perl core to use the
new one, assuming in each that there is enough space.
Thanks to Jarkko Hietaniemi for suggesting this function name
|
| |
|
| |
|
|
|
|
|
| |
Commit 24caacbccae7b938deecdcc3f13dd66c9c6a684e removed all uses of this
variable, but failed to remove it.
|
|
|
|
|
|
| |
Same for [[:upper:]] and \p{Upper}. These were matching instead all of
[[:alpha:]] or \p{Alpha}. What /\p{Lower}/i and /\p{Upper}/i match instead
is \p{Cased}, and so that is what these should match.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some folks like to write long sentences and then use them as
variable names, which doesn't come up that often, but when it
does, the build on VMS falls down hard if any of the resulting
symbols is longer than 31 characters. The problem is not for
the compiler, which when using /NAMES=SHORTENED (which we now do
by default) will shorten the symbols, but for the linker, which
must have an exact list of the symbol names to be exported when
creating the perlshr.exe shareable image.
That list of potentially shortened symbols goes in a linker options
file created by vms/gen_shrfls.pl. Until now we had no recourse
but to hard-code there a mapping of long symbols to shortened ones,
but the AUTODIN-II polynomial used by the compiler to do the
shortening is (partially) documented under the help for CC/NAMES,
and it was possible to extrapolate from there and create a pure-
Perl implementation that mimics precisely what the C compiler (and
the C++ compiler under "extern C" declarations) use for shortening
long symbol names.
Symbols like Perl__it_was_the_best_of_times_it_was_the_worst_of_times
can now be created freely without causing the VMS linker to seize up.
|
| |
|
|
|
|
|
|
|
|
|
| |
Commit d11155ec2b4e3f6cf952e2a25615aec506a8e296 changed the format of
some of the generated tables, but I left some of the old comments and
variable names the same in order to not make this already large commit
bigger. This updates these to reflect the new format.
It also refactors one 'if' statement to not use a block.
|
|
|
|
|
| |
\h and \p{XPosixBlank} contain the same code points, so there is no need
to have both of them.
|
|
|
|
|
| |
PL_check_mutex only exists on threading builds, so makedef.pl needs to
know about that conditionality to produce correct export lists.
|
|
|
|
|
| |
This function provides a convenient and thread-safe way for modules to
hook op checking.
|
| |
|
|
|
|
|
| |
Ensure that every module in the ExtUtils-ParseXS distribution has
a $VERSION.
|
|
|
|
| |
This outdents some statements that are no longer enclosed in a block
|
|
|
|
|
| |
These were incorrectly stating that some tables are accessible via
Unicode::UCD, and giving the wrong name in some instances.
|
|
|
|
|
| |
By converting this property to requiring adjustments to get the proper
values, its storage size decreases by more than half.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thanks to Tony Cook for suggesting this.
The API is changed from returning deltas of code points, to storing the
actual correct values, but requiring adjustments for the non-initial
elements in a range, as explained in the pod.
This makes the data less confusing to look at, and gets rid of
inconsistencies if we didn't make the same sort of deltas for entries
that were, e.g. arrays of code points.
|
|
|
|
|
|
|
| |
All the files that should ever be read by the subroutine will be found
in the unicore directory, so can specify it in the subroutine instead of
in each call to it. This makes things slightly easier in future
commits.
|
|
|
|
|
| |
One comment is out-dated, also moves a line of code so that the comments
flow better.
|
|
|
|
|
|
|
| |
Before 360732b5267d5, when dirend was either never set at all or
set to NULL, the routine always returned early before executing
the parts that look at dirend. But after that change it became
possible to dereference a null dirend pointer. Let's not do that.
|
|
|
|
| |
This adds text to specify what happens under 'use locale'.
|
|
|
|
|
|
| |
This takes advantage of the recently added Configure probe, and if the
platform has an isblank library function, calls that under locale. This
now matches the documentation
|
|
|
|
|
|
|
| |
We have code that assumes that ASCII should be locale dependent, but it
was missing its final link. This supplies that, and makes the code work
as documented. I thought it better to do that then to document yet
another exception.
|