* src/operand2sig.c (operand2sig): AIX uses a different bit pattern
in the returned status from the wait() functions and from shells.
Therefore hardcode the selection of the lower bits of the number.
* NEWS: Mention the fix.
Now, it prints a diagnostic or a line to stdout for each argument.
[bug introduced in the bourne-shell-to-C rewrite for coreutils-6.11]
+ kill now converts from number to signal name correctly on AIX.
+ Previously it would have always returned the 'EXIT' name.
+ [bug introduced in fileutils-4.1.9]
+
split no longer exits when invocations of a --filter return EPIPE.
[bug introduced in coreutils-8.26]
char *endp;
long int l = (errno = 0, strtol (operand, &endp, 10));
int i = l;
- signum = (operand == endp || *endp || errno || i != l ? -1
- : WIFSIGNALED (i) ? WTERMSIG (i) : i);
+ signum = (operand == endp || *endp || errno || i != l ? -1 : i);
+
+ if (signum != -1)
+ {
+ /* Note AIX uses a different bit pattern for status returned
+ from shell and wait(), so we can't use WTERMSIG etc. here.
+ Also ksh returns 0xFF + signal number. */
+ signum &= signum >= 0xFF ? 0xFF : 0x7F;
+ }
}
else
{