printf("Type 'gdb viewer %d' to attatch your debugger to this thread.\n", getpid());
printf("Type 'gdb viewer %d' to attach your debugger to this thread.\n", getpid());
void abnormal_exit_handler(int signum){  /* Free any shared memory that has been allocated */  PgShmemCleanup();#if 1  if (    (signum == SIGSEGV)       || (signum == SIGILL)	   || (signum == SIGABRT)	 )  {    PR_GetCurrentThread();    printf("prog = viewer\npid = %d\nsignal = %s\n", getpid(), strsignal(signum));#if 0    printf("stack logged to someplace\n");    printf("need to fix xpcom/base/nsTraceRefCnt.cpp in WalkTheStack.\n");    nsTraceRefcnt::WalkTheStack(stdout);#endif    printf("Sleeping for 5 minutes.\n");    printf("Type 'gdb viewer %d' to attatch your debugger to this thread.\n", getpid());    sleep(300);    printf("Done sleeping...\n");  }#endif  _exit(1);} 