mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-23 08:33:17 +01:00
Handle ttyname(3) failure better.
This commit is contained in:
parent
06ddd3dcf8
commit
92cc3a6914
@ -72,9 +72,10 @@ cmd_list_windows_exec(struct cmd *self, struct cmd_ctx *ctx)
|
||||
}
|
||||
size += gd->hsize * sizeof *gd->linedata;
|
||||
|
||||
name = NULL;
|
||||
if (wp->fd != -1)
|
||||
name = ttyname(wp->fd);
|
||||
else
|
||||
if (name == NULL)
|
||||
name = "unknown";
|
||||
ctx->print(ctx,
|
||||
" %s [%ux%u] [history %u/%u, %llu bytes]",
|
||||
|
Loading…
Reference in New Issue
Block a user