[Pkg-gnupg-commit] [libassuan] 316/437: Sho the pid in the the hello line.

Eric Dorland eric at moszumanska.debian.org
Fri May 22 05:33:57 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libassuan.

commit a00b1ede5403f1e38534cc3b232739f20b8567e9
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Apr 22 15:51:01 2010 +0000

    Sho the pid in the the hello line.
---
 src/ChangeLog       |  5 +++++
 src/assuan-listen.c | 13 ++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index 2222e74..3409bc8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-22  Werner Koch  <wk at g10code.com>
+
+	* assuan-listen.c (assuan_accept): Show the PID with the default
+	hello message.
+
 2010-04-19  Werner Koch  <wk at g10code.com>
 
 	* system-w32.c (is_socket): New.
diff --git a/src/assuan-listen.c b/src/assuan-listen.c
index c37c3a5..55ddd0a 100644
--- a/src/assuan-listen.c
+++ b/src/assuan-listen.c
@@ -112,7 +112,18 @@ assuan_accept (assuan_context_t ctx)
   else if (p)
     rc = assuan_write_line (ctx, p);
   else
-    rc = assuan_write_line (ctx, "OK Pleased to meet you");
+    {
+      static char const okstr[] = "OK Pleased to meet you";
+      pid_t apid = assuan_get_pid (ctx);
+      if (apid != ASSUAN_INVALID_PID)
+        {
+          char tmpbuf[50];
+          snprintf (tmpbuf, sizeof tmpbuf, "%s, process %i", okstr, (int)apid);
+          rc = assuan_write_line (ctx, tmpbuf);
+        }
+      else
+        rc = assuan_write_line (ctx, okstr);
+    }
   if (rc)
     return rc;
     

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git



More information about the Pkg-gnupg-commit mailing list