[git] GnuPG - branch, master, updated. gnupg-2.2.7-272-g804a77e

by NIIBE Yutaka cvs at cvs.gnupg.org
Wed Nov 14 03:18:16 CET 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  804a77edd9472d44606641b7772550521e1ba271 (commit)
      from  914fa3be22bf8848a97a7dd405a040d6ef31e2fd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 804a77edd9472d44606641b7772550521e1ba271
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Wed Nov 14 10:45:15 2018 +0900

    agent: Simplify agent_popup_message_stop.
    
    * agent/call-pinentry.c (agent_popup_message_stop): Just kill it.
    
    --
    
    By checking if it's alive or not, we can lower a risk of sending
    SIGINT to a wrong process on unusual condition when PID is re-used to
    a different process.
    
    That's true, however, since it's alive usually, simply sending SIGINT
    is enough here.
    
    Note that here is a race condition for detecting if process is active
    or not;  A process can die just after being detected alive.
    
    Moreover, when the process of pinentry accidentally died already, it
    should have caused return of assuan_transact and the thread of
    popup_message_thread likely already set popup_finished=1.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c
index 3716e11..38c01e2 100644
--- a/agent/call-pinentry.c
+++ b/agent/call-pinentry.c
@@ -1543,14 +1543,6 @@ agent_popup_message_stop (ctrl_t ctrl)
       TerminateProcess (process, 1);
     }
 #else
-  else if (pid && ((rc=waitpid (pid, NULL, WNOHANG))==-1 || (rc == pid)) )
-    { /* The daemon already died.  No need to send a kill.  However
-         because we already waited for the process, we need to tell
-         assuan that it should not wait again (done by
-         unlock_pinentry). */
-      if (rc == pid)
-        assuan_set_flag (entry_ctx, ASSUAN_NO_WAITPID, 1);
-    }
   else if (pid > 0)
     kill (pid, SIGINT);
 #endif

-----------------------------------------------------------------------

Summary of changes:
 agent/call-pinentry.c | 8 --------
 1 file changed, 8 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list