]> code.ossystems Code Review - openembedded-core.git/commitdiff
perl: Help resolving WNOHANG and _exit in Posix module
authorKhem Raj <raj.khem@gmail.com>
Tue, 8 Feb 2022 22:51:51 +0000 (14:51 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 16 Feb 2022 09:46:31 +0000 (09:46 +0000)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
meta/recipes-devtools/perl/files/0001-ipc-force-POSIX-WNOHANG-resolving.patch [new file with mode: 0644]
meta/recipes-devtools/perl/perl_5.34.0.bb

diff --git a/meta/recipes-devtools/perl/files/0001-ipc-force-POSIX-WNOHANG-resolving.patch b/meta/recipes-devtools/perl/files/0001-ipc-force-POSIX-WNOHANG-resolving.patch
new file mode 100644 (file)
index 0000000..3df15d4
--- /dev/null
@@ -0,0 +1,52 @@
+From 0d8c411ef7e8b4452007c77eee3d83d227b86bb4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 8 Feb 2022 14:05:22 -0800
+Subject: [PATCH] ipc: force POSIX::WNOHANG resolving
+
+It seems POSIX module is special and may not have autovivified (resolved) WNOHANG.
+see [1]
+
+Fixes
+ Bareword "POSIX::WNOHANG" not allowed while "strict subs"
+
+[1] https://redmine.lighttpd.net/projects/lighttpd/repository/14/revisions/78eb0e39454ab3ca8e7ef77f1d014b50b3632fb9
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ cpan/IPC-Cmd/lib/IPC/Cmd.pm | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/cpan/IPC-Cmd/lib/IPC/Cmd.pm
++++ b/cpan/IPC-Cmd/lib/IPC/Cmd.pm
+@@ -499,7 +499,7 @@ sub kill_gently {
+         next;
+     }
+-    my $waitpid = waitpid($pid, POSIX::WNOHANG);
++    my $waitpid = waitpid($pid, POSIX::WNOHANG());
+     if ($waitpid eq -1) {
+         $child_finished = 1;
+@@ -619,10 +619,10 @@ sub open3_run {
+           #
+           kill(-9, $$);
+-          POSIX::_exit 1;
++          POSIX::_exit(1);
+         }
+-        my $waitpid = waitpid($pid, POSIX::WNOHANG);
++        my $waitpid = waitpid($pid, POSIX::WNOHANG());
+         # child finished, catch it's exit status
+         if ($waitpid ne 0 && $waitpid ne -1) {
+@@ -1005,7 +1005,7 @@ sub run_forked {
+           $child_finished = 1;
+         }
+-        my $waitpid = waitpid($pid, POSIX::WNOHANG);
++        my $waitpid = waitpid($pid, POSIX::WNOHANG());
+         # child finished, catch it's exit status
+         if ($waitpid ne 0 && $waitpid ne -1) {
index e4bcfe3ce69a6fcfaae6aeb04bef55a120370d5a..48d755744fe8e51a60126d75e02529c1a37ff4f9 100644 (file)
@@ -20,6 +20,7 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
            file://aacd2398e766500cb5d83c4d76b642fcf31d997a.patch \
            file://ea57297a58b8f10ab885c19eec48ea076116cc1f.patch \
            file://5bc1e5fdd87aa205011512cd1e6cc655bcf677fd.patch \
+           file://0001-ipc-force-POSIX-WNOHANG-resolving.patch \
            "
 SRC_URI:append:class-native = " \
            file://perl-configpm-switch.patch \