diff options
Diffstat (limited to 'src/assuan-listen.c')
-rw-r--r-- | src/assuan-listen.c | 13 |
1 files changed, 12 insertions, 1 deletions
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; |