File tree Expand file tree Collapse file tree 4 files changed +23
-4
lines changed
Expand file tree Collapse file tree 4 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ Revision history for Perl extension threads::shared.
33-
44 -
55
6+ 1.59 Wed Nov 28 03:53:14 2018
7+ - Prevent XSLoader call on non-threaded Perl
8+
691.58 Mon Jan 22 20:09:07 EST 2018
710 - Fix CLANG macros.
811 - Sync with blead.
Original file line number Diff line number Diff line change 1- threads::shared version 1.58
1+ threads::shared version 1.59
22============================
33
44This module needs Perl 5.8.0 or later compiled with USEITHREADS.
Original file line number Diff line number Diff line change @@ -4,10 +4,11 @@ use 5.008;
44
55use strict;
66use warnings;
7+ use Config;
78
89use Scalar::Util qw( reftype refaddr blessed) ;
910
10- our $VERSION = ' 1.58 ' ; # Please update the pod, too.
11+ our $VERSION = ' 1.59 ' ; # Please update the pod, too.
1112my $XS_VERSION = $VERSION ;
1213$VERSION = eval $VERSION ;
1314
@@ -18,7 +19,7 @@ $threads::shared::threads_shared = 1;
1819$threads::shared::clone_warn = undef ;
1920
2021# Load the XS code, if applicable
21- if ($threads::threads ) {
22+ if ($Config::Config { ' useithreads ' } && $ threads::threads ) {
2223 require XSLoader;
2324 XSLoader::load(' threads::shared' , $XS_VERSION );
2425
@@ -195,7 +196,7 @@ threads::shared - Perl extension for sharing data structures between threads
195196
196197=head1 VERSION
197198
198- This document describes threads::shared version 1.58
199+ This document describes threads::shared version 1.59
199200
200201=head1 SYNOPSIS
201202
Original file line number Diff line number Diff line change 1919# In this file, we use the latter "Baby Perl" approach, and increment
2020# will be worked over by t/op/inc.t
2121
22+ $| = 1;
2223$Level = 1;
2324my $test = 1;
2425my $planned ;
@@ -1746,4 +1747,18 @@ ($;$)
17461747 }
17471748}
17481749
1750+ # Orphaned Docker or Linux containers do not necessarily attach to PID 1. They might attach to 0 instead.
1751+ sub is_linux_container {
1752+
1753+ if ($^O eq ' linux' && open my $fh , ' <' , ' /proc/1/cgroup' ) {
1754+ while (<$fh >) {
1755+ if (m { ^\d +:pids:(.*)} && $1 ne ' /init.scope' ) {
1756+ return 1;
1757+ }
1758+ }
1759+ }
1760+
1761+ return 0;
1762+ }
1763+
174917641;
You can’t perform that action at this time.
0 commit comments