More through testing of my quick fix (ie trying bigger examples)
revealed that my "trap '' 26" hack failed about 1% of the time.
This being too often (approximately once per program run!)
I hacked up fptools/ghc/lib/std/cbits/system.c by adding this code
case 0:
/* the child */
#ifdef ADR_HACK
block_vtalrm_signal(); /* from rts/ITimer.c */
#endif
execl("/bin/sh", "sh", "-c", cmd, NULL);
_exit(127);
}
Compiled it using this make entry
RTS = /z/reid/tmp/fptools
system.o: system.c
$(CC) -DADR_HACK=1 -I$(RTS)/mk/config.h -I$(RTS)/ghc/includes
-I$(RTS)/ghc/lib/std/cbits system.c -c
And added system.o to my link line.
Initial testing suggests that it fixes the problem.
A