[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Port functions/shell to Solaris 10
From: |
Paul Eggert |
Subject: |
[PATCH] Port functions/shell to Solaris 10 |
Date: |
Tue, 8 Oct 2019 15:28:10 -0700 |
* tests/scripts/functions/shell: Port exit-status calculation
to Solaris 10 with Perl 5.8.4.
---
tests/scripts/functions/shell | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/scripts/functions/shell b/tests/scripts/functions/shell
index 54514e8..93ff7cb 100644
--- a/tests/scripts/functions/shell
+++ b/tests/scripts/functions/shell
@@ -69,7 +69,13 @@ all: ; @echo $(.SHELLSTATUS)
}
waitpid($pid, 0);
# .SHELLSTATUS for a signal gives 128 + the signal number
- my $ret = $? + 128;
+ # my $ret = $? + 128;
+ my $ret = $?;
+ if (256 <= $ret) {
+ # Solaris 10 perl 5.8.4 puts signal number + 128 into the high 8 bits.
+ $ret >>= 8;
+ }
+ $ret |= 128;
run_make_test('.PHONY: all
$(shell kill -2 $$$$)
--
2.21.0
- [PATCH] Port functions/shell to Solaris 10,
Paul Eggert <=