I have a program that throws a segmentation fault on certain circumstances. I want to execute a command when the segmentation fault occurs to process the data, then execute the command again, and keep doing so until the segmentation fault stops.
As a rough attempt at pseudo code,
dodgy_command while SegFault dataProcessing dodgy_command end
I think I need to be using a Trap command, but I don't understand the syntax for this command.