Dustmite can't handle my memory segfault
Anonymouse via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Oct 22 15:03:35 PDT 2016
On Friday, 21 October 2016 at 10:13:23 UTC, Nordlöw wrote:
> #!/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)
>
Assuming you want to remap 134 to 0 (success):
#!/bin/bash
cmd="$1"
shift 2>/dev/null
$cmd "$@"
[ $? = 134 ] && exit 0 || exit 1
More information about the Digitalmars-d-learn
mailing list