From: oes Date: Thu, 27 Nov 2003 19:20:27 +0000 (+0000) Subject: Diagnostics: Now preserve the returncode of pthread_create X-Git-Tag: v_3_0_3~65 X-Git-Url: http://www.privoxy.org/gitweb/?a=commitdiff_plain;h=fac402e60f83d372b6c4d88ffbccf4db4e09271f;hp=6b7f1df53a0f5cd02b53f59c18502a35fa1addfb;p=privoxy.git Diagnostics: Now preserve the returncode of pthread_create in errno. Closes BR #775721. Thanks to Geoffrey Hausheer. --- diff --git a/jcc.c b/jcc.c index bd330371..8ecf8cf2 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.92.2.11 2003/05/14 12:32:02 oes Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.92.2.12 2003/07/11 11:34:19 oes Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/Attic/jcc.c,v $ @@ -33,6 +33,9 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.92.2.11 2003/05/14 12:32:02 oes Exp $"; * * Revisions : * $Log: jcc.c,v $ + * Revision 1.92.2.12 2003/07/11 11:34:19 oes + * No longer ignore SIGCHLD. Fixes bug #769381 + * * Revision 1.92.2.11 2003/05/14 12:32:02 oes * Close jarfile on graceful exit, remove stray line * @@ -2315,8 +2318,9 @@ static void listen_loop(void) pthread_attr_init(&attrs); pthread_attr_setdetachstate(&attrs, PTHREAD_CREATE_DETACHED); - child_id = (pthread_create(&the_thread, &attrs, - (void*)serve, csp) ? -1 : 0); + errno = pthread_create(&the_thread, &attrs, + (void*)serve, csp); + child_id = errno ? -1 : 0; pthread_attr_destroy(&attrs); } #endif