You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to capture the exit code from a system() call, right shift $? by eight bits. Unified diff follows:
--- clatd 2023-11-02 20:49:06
+++ clatd+ 2023-11-02 21:10:23
@@ -84,7 +84,7 @@
#
# Runs a command. First argument is what subroutine to call to a message if
# the command doesn't exit successfully, second is the command itself, and
-# any more is the command line arguments.
+# any more are the command line arguments.
#
sub cmd {
my $msgsub = shift;
@@ -98,7 +98,7 @@
} elsif($? & 127) {
&{$msgsub}("cmd(@cmd) died with signal ", ($? & 127));
} else {
- &{$msgsub}("cmd(@cmd) returned ", ($? >> 127));
+ &{$msgsub}("cmd(@cmd) returned ", ($? >> 8));
}
}
return $?;
The text was updated successfully, but these errors were encountered:
In order to capture the exit code from a system() call, right shift $? by eight bits. Unified diff follows:
The text was updated successfully, but these errors were encountered: