I have a script that calls a program (specifically, ttf2afm
, part of tetex 3.0) that sometimes segfaults and sometimes doesn't. The information I need is always printed out before it segfaults, but I'm having a hard time stopping the pipe redirection from failing and not outputting anything to the pipe when the program fails.
I've tried redirecting through a FIFO, parenthesizing the process with a true
at the end, executing from a shell function and encasing in sh -c
, but the script never seems to let the process output anything, redirected or otherwise–not even to stderr.
I know it is capable of output, being that it's perfectly capable of giving it from the command-line, but not from a script for some reason.
My question is, is there any way for the script to ignore the fact that the program segfaults and give me the output anyway?
I'm running BASH 4.1.10(2)-release.