[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] Further eliminate POSIX-emulation under LinuxThreads



[crossposted to the Debian GNU/kFreeBSD development list debian-bsd
                         and the Perl 5 development list perl5-porters ]

On Sat, Feb 11, 2012 at 07:57:43PM +0000, Ævar Arnfjörð Bjarmason wrote:
> [This is a patch I've just committed to
> avar/remove-linuxthreads-pid-caching) I'll be pushing it to blead
> unless there are any sound objections to it]
> 
> 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.

[...]

> This is also 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.

[...]

> We've already been failing the tests in t/op/getpid.t on these systems
> that nobody apparently uses, just leave those tests in place as-is so
> they'll start failing if perl ever runs on a system without POSIX
> thread semantics.

I have no idea whether it's really LinuxThreads based or something
else, but please note that Debian GNU/kFreeBSD seems to be affected as
t/op/getpid.t started failing there with 0e21945565eb4664d84 (around
Perl 5.15.1). See [perl #96270].

> 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().

I'm cc'ing the debian-bsd list, hopefully the porters can comment on this.

 http://www.debian.org/ports/kfreebsd-gnu/
 http://www.nntp.perl.org/group/perl.perl5.porters/2012/02/msg183442.html
 https://rt.perl.org/rt3/Public/Bug/Display.html?id=96270
 
-- 
Niko Tyni   ntyni@debian.org


Reply to: