export linkOnFailure; add test case for abnormal exits
oops - strip out cut and paste noise