On Friday, 21 October 2016 at 06:44:54 UTC, Nordlöw wrote:
On Thursday, 20 October 2016 at 22:18:20 UTC, Vladimir Panteleev wrote:
On Thursday, 20 October 2016 at 21:33:59 UTC, Nordlöw wrote:
I need your help here, I'm complete stuck. Vladimir?

The exit status of the `./array_ex` call (as seen from bash) is 134. How do I, in Bash, map that exit status to zero, and all other exit statuses to non-zero?

Solution construct a Bash script named, say show-segfault:


#!/usr/bin/env python3

import sys
import pty

stat = pty.spawn(sys.argv[1:])
if stat == 256:
    exit(42)                    # remap to 42
else:
    exit(stat)


and wrap call to rdmd as


show-segfault rdmd ...

Reply via email to