summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2022-11-07 10:00:28 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2022-11-07 10:00:28 +0900
commit07adf41f0f49233cc4842bad1e6d2fdc9dc431af (patch)
tree96009fb60a25045e4787241edf05f845edfc9987
parent870fdcf92e5991c0bb2e349a951aa8dd93b0e22f (diff)
downloadlibassuan-07adf41f0f49233cc4842bad1e6d2fdc9dc431af.tar.gz
Show the pid of listening process in the hello line.
* src/assuan-listen.c (assuan_accept): Use getpid instead of assuan_get_pid. -- This changes the initial interaction. Before the change, the PID of peer was shown from listening process (but not used at all, in the code). That is, it was the PID of connecting process. After the change, the PID of listening process is shown, which can be used by connecting process. GnuPG-bug-id: 6236 Fixes-commit: a00b1ede5403f1e38534cc3b232739f20b8567e9 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
-rw-r--r--src/assuan-listen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/assuan-listen.c b/src/assuan-listen.c
index 6755d59..93560ff 100644
--- a/src/assuan-listen.c
+++ b/src/assuan-listen.c
@@ -117,7 +117,7 @@ assuan_accept (assuan_context_t ctx)
else
{
static char const okstr[] = "OK Pleased to meet you";
- pid_t apid = assuan_get_pid (ctx);
+ pid_t apid = getpid ();
if (apid != ASSUAN_INVALID_PID)
{
char tmpbuf[50];