summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/mbbsd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 0ec717a8..c329def7 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -1853,6 +1853,9 @@ tunnel_login(char *argv0, struct ProgramOption *option)
fclose(fp);
}
+ // XXX on Linux, argv0 will change if you setproctitle.
+ strlcpy(buf, argv0, sizeof(buf));
+
/* main loop */
while( 1 )
{
@@ -1882,7 +1885,7 @@ tunnel_login(char *argv0, struct ProgramOption *option)
/* here is only child running */
#ifndef VALGRIND
- snprintf(margs, sizeof(margs), "%s tunnel(%u)-%s ", argv0, pid, dat.port);
+ snprintf(margs, sizeof(margs), "%s tunnel(%u)-%s ", buf, pid, dat.port);
setproctitle("%s: ...login wait... ", margs);
#endif
close(tunnel);