-const char jcc_rcs[] = "$Id: jcc.c,v 1.110 2006/12/13 14:52:53 etresoft Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.111 2006/12/23 16:15:06 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
*
* Revisions :
* $Log: jcc.c,v $
+ * Revision 1.111 2006/12/23 16:15:06 fabiankeil
+ * Don't prevent core dumps by catching SIGABRT.
+ * It's rude and makes debugging unreasonable painful.
+ *
* Revision 1.110 2006/12/13 14:52:53 etresoft
* Fix build failure on MacOS X. Global symbols can be either static or extern, but not both.
*
#ifndef HAVE_GETHOSTBYNAME_R
pthread_mutex_t gethostbyname_mutex;
#endif /* ndef HAVE_GETHOSTBYNAME_R */
+
+#ifndef HAVE_RANDOM
+pthread_mutex_t rand_mutex;
+#endif /* ndef HAVE_RANDOM */
+
#endif /* FEATURE_PTHREAD */
#if defined(unix) || defined(__EMX__)
* Function : sig_handler
*
* Description : Signal handler for different signals.
- * Exit gracefully on ABRT, TERM and INT
+ * Exit gracefully on TERM and INT
* or set a flag that will cause the errlog
* to be reopened by the main thread on HUP.
*
#endif
{
int argc_pos = 0;
-#ifdef HAVE_RANDOM
- unsigned int random_seed;
-#endif /* ifdef HAVE_RANDOM */
+ int random_seed;
#ifdef unix
struct passwd *pw = NULL;
struct group *grp = NULL;
#ifndef HAVE_GETHOSTBYNAME_R
pthread_mutex_init(&gethostbyname_mutex,0);
#endif /* ndef HAVE_GETHOSTBYNAME_R */
+
+#ifndef HAVE_RANDOM
+ pthread_mutex_init(&rand_mutex,0);
+#endif /* ndef HAVE_RANDOM */
+
#endif /* FEATURE_PTHREAD */
+ random_seed = (int)time(NULL);
#ifdef HAVE_RANDOM
- random_seed = (unsigned int)time(NULL);
srandom(random_seed);
+#else
+ srand(random_seed);
#endif /* ifdef HAVE_RANDOM */
/*