pgsql: Properly call strerror() in thread test; add comments.

Started by Bruce Momjianalmost 15 years ago3 messagescomitters
Jump to latest
#1Bruce Momjian
bruce@momjian.us

Properly call strerror() in thread test; add comments.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5473f283f501ff9f5e38e89d3a2e89f738a7e76f

Modified Files
--------------
src/test/thread/thread_test.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)

In reply to: Bruce Momjian (#1)
Re: pgsql: Properly call strerror() in thread test; add comments.

Why have you removed the GetLastError() call? MSDN says that "The
return value is the calling thread's last-error code".

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

#3Bruce Momjian
bruce@momjian.us
In reply to: Peter Geoghegan (#2)
Re: pgsql: Properly call strerror() in thread test; add comments.

Peter Geoghegan wrote:

Why have you removed the GetLastError() call? MSDN says that "The
return value is the calling thread's last-error code".

True, but we check it also after all the threads have completed setting
their error values. I removed it because Unix does not have such a
check and it seemed logical to do the check only after we were done.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +