Skip to content

Commit 2310dd3

Browse files
committed
Add reporting of specificy threading failure functions.
1 parent 4cc247f commit 2310dd3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/tools/test_thread_funcs.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Header: /cvsroot/pgsql/src/tools/Attic/test_thread_funcs.c,v 1.1 2003/09/03 19:30:31 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/tools/Attic/test_thread_funcs.c,v 1.2 2003/09/03 19:36:31 momjian Exp $
1010
*
1111
* This program tests to see if your standard libc functions use
1212
* pthread_setspecific()/pthread_getspecific() to be thread-safe.
@@ -62,6 +62,13 @@ int main(int argc, char *argv[])
6262
pthread_join(thread1, NULL);
6363
pthread_join(thread2, NULL);
6464

65+
if (hostent_p1 == hostent_p2)
66+
printf("Your gethostbyname() is _not_ thread-safe\n");
67+
if (passwd_p1 == passwd_p2)
68+
printf("Your getpwuid() is _not_ thread-safe\n");
69+
if (strerror_p1 == strerror_p2)
70+
printf("Your strerror() is _not_ thread-safe\n");
71+
6572
if (hostent_p1 != hostent_p2 &&
6673
passwd_p1 != passwd_p2 &&
6774
strerror_p1 != strerror_p2)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy