mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 11:18:48 +00: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;
|
size += gd->hsize * sizeof *gd->linedata;
|
||||||
|
|
||||||
|
name = NULL;
|
||||||
if (wp->fd != -1)
|
if (wp->fd != -1)
|
||||||
name = ttyname(wp->fd);
|
name = ttyname(wp->fd);
|
||||||
else
|
if (name == NULL)
|
||||||
name = "unknown";
|
name = "unknown";
|
||||||
ctx->print(ctx,
|
ctx->print(ctx,
|
||||||
" %s [%ux%u] [history %u/%u, %llu bytes]",
|
" %s [%ux%u] [history %u/%u, %llu bytes]",
|
||||||
|
Loading…
Reference in New Issue
Block a user