herr_t
ss_zap(void)
{
SS_ENTER(ss_zap, herr_t);
if (sslib_g.initialized && !sslib_g.finalized)
sslib_g.finalized = TRUE;
#if defined WIN32 || defined JANUS
#else
/* This function is only called by _saf_error() when it's about to call MPI_Abort(), and the buggy MPICH calls exit()
* instead of raising a SIGABRT. Therefore if signal debugging is enabled with the SSLIB_DEBUG environment variable we'll
* start the debugger here before its too late. */
if (sslib_g.debug_signal) {
/* ISSUE: We should really set handlers back to their default values now and unmask them */
int self = ss_mpi_comm_rank(SS_COMM_WORLD);
char buf[256];
sprintf(buf, "SSLIB: MPI task %d, PID %d", self, getpid());
psignal(SIGABRT, buf);
ss_debug_start(sslib_g.debugger);
fprintf(stderr, "SSLIB: MPI task %d, PID %d is paused pending debug\n", self, getpid());
while (true) pause();
}
#endif /*WIN32*/
SS_LEAVE(0);
}