diff options
author | Werner Koch <wk@gnupg.org> | 2010-04-22 15:51:01 +0000 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2010-04-22 15:51:01 +0000 |
commit | a00b1ede5403f1e38534cc3b232739f20b8567e9 (patch) | |
tree | 239c649c1e39b1f828bed2d7e34e8666f3463289 /src/assuan-listen.c | |
parent | e83d4ed686b7947d87a7ec9ed82ad74c0fe7d475 (diff) | |
download | libassuan-a00b1ede5403f1e38534cc3b232739f20b8567e9.tar.gz |
Sho the pid in the the hello line.
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; |