mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
agent: Fix a bug of handling return code from npth_join.
* agent/call-pinentry.c (agent_popup_message_stop): Fix npth_join return code. -- pth_join returns TRUE (1) on success. But npth_join (and pthread_join) returns 0 on success, returns error number on error.
This commit is contained in:
parent
60c58766ae
commit
1999446644
1 changed files with 2 additions and 2 deletions
|
@ -1266,9 +1266,9 @@ agent_popup_message_stop (ctrl_t ctrl)
|
|||
|
||||
/* Now wait for the thread to terminate. */
|
||||
rc = npth_join (popup_tid, NULL);
|
||||
if (!rc)
|
||||
if (rc)
|
||||
log_debug ("agent_popup_message_stop: pth_join failed: %s\n",
|
||||
strerror (errno));
|
||||
strerror (rc));
|
||||
/* Thread IDs are opaque, but we try our best here by resetting it
|
||||
to the same content that a static global variable has. */
|
||||
memset (&popup_tid, '\0', sizeof (popup_tid));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue