Dustmite can't handle my memory segfault

Nordlöw via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Oct 21 03:13:23 PDT 2016


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 ...


More information about the Digitalmars-d-learn mailing list