diff options
-rw-r--r-- | client.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -46,6 +46,11 @@ client_init(char *path, struct client_ctx *cctx, int start_server, int flags) int mode; struct buffer *b; char *name; + char rpathbuf[MAXPATHLEN]; + + if (realpath(path, rpathbuf) == NULL) + strlcpy(rpathbuf, path, sizeof rpathbuf); + setproctitle("client (%s)", rpathbuf); if (lstat(path, &sb) != 0) { if (start_server && errno == ENOENT) { @@ -135,7 +140,6 @@ client_main(struct client_ctx *cctx) siginit(); logfile("client"); - setproctitle("client"); error = NULL; xtimeout = INFTIM; |