Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
144d828e
Commit
144d828e
authored
Apr 26, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More thread error improvments.
parent
2f522360
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/tools/thread/thread_test.c
src/tools/thread/thread_test.c
+6
-6
No files found.
src/tools/thread/thread_test.c
View file @
144d828e
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.2
4 2004/04/26 00:36:18
momjian Exp $
* $PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.2
5 2004/04/26 00:38:25
momjian Exp $
*
* This program tests to see if your standard libc functions use
* pthread_setspecific()/pthread_getspecific() to be thread-safe.
...
...
@@ -94,7 +94,7 @@ main(int argc, char *argv[])
#if !defined(HAVE_GETADDRINFO) && !defined(HAVE_GETHOSTBYNAME_R)
if
(
gethostname
(
myhostname
,
MAXHOSTNAMELEN
)
!=
0
)
{
fprintf
(
stderr
,
"
can not get local hostname,
exiting
\n
"
);
fprintf
(
stderr
,
"
Can not get local hostname **
\n
exiting
\n
"
);
exit
(
1
);
}
#endif
...
...
@@ -202,7 +202,7 @@ func_call_1(void)
open
(
"/tmp/thread_test.1"
,
O_RDWR
|
O_CREAT
|
O_EXCL
,
0600
)
>=
0
)
{
fprintf
(
stderr
,
"Could not create file in /tmp or
\n
"
);
fprintf
(
stderr
,
"
could not generate failure for create file in /tmp,
exiting
\n
"
);
fprintf
(
stderr
,
"
Could not generate failure for create file in /tmp **
\n
exiting
\n
"
);
exit
(
1
);
}
...
...
@@ -215,7 +215,7 @@ func_call_1(void)
sched_yield
();
if
(
errno
!=
EEXIST
)
{
fprintf
(
stderr
,
"errno not thread-safe
;
exiting
\n
"
);
fprintf
(
stderr
,
"errno not thread-safe
**
\n
exiting
\n
"
);
unlink
(
"/tmp/thread_test.1"
);
exit
(
1
);
}
...
...
@@ -271,7 +271,7 @@ func_call_2(void)
/* open non-existant file */
if
(
open
(
"/tmp/thread_test.2"
,
O_RDONLY
,
0600
)
>=
0
)
{
fprintf
(
stderr
,
"Read-only open succeeded without create
,
exiting
\n
"
);
fprintf
(
stderr
,
"Read-only open succeeded without create
**
\n
exiting
\n
"
);
exit
(
1
);
}
...
...
@@ -284,7 +284,7 @@ func_call_2(void)
sched_yield
();
if
(
errno
!=
ENOENT
)
{
fprintf
(
stderr
,
"errno not thread-safe
;
exiting
\n
"
);
fprintf
(
stderr
,
"errno not thread-safe
**
\n
exiting
\n
"
);
unlink
(
"/tmp/thread_test.A"
);
exit
(
1
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment