www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Barski <bar...@resonateinc.com>
Subject other/1719: pthread library functions do not set errno
Date Fri, 23 Jan 1998 04:13:25 GMT

>Number:         1719
>Category:       other
>Synopsis:       pthread library functions do not set errno
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Thu Jan 22 20:20:00 PST 1998
>Last-Modified:
>Originator:     barski@resonateinc.com
>Organization:
apache
>Release:        1.3b3
>Environment:
Solaris 2.5, etc
>Description:
In http_main.c, every failed call to a pthreads library function
(pthread_mutex_init(), etc) is followed by perror(). Since pthread
library functions do not set errno, this may produce confusing
error messages.
>How-To-Repeat:

>Fix:
use something like this:
void mt_perror(const char *str, int err)
{
	fprintf(stderr, "%s: Error %d (%s)\n", str, err, strerror(err));
%7
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]




Mime
View raw message