From 397f6500878ff3275a360a7d1a59538d4a27117a Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Wed, 10 May 2017 16:28:30 +0200 Subject: [PATCH] screen: don't stat("") Signed-off-by: Christian Brauner --- src/screen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/screen.c b/screen.c index 8f50d76..bb2711f 100644 --- a/screen.c +++ b/screen.c @@ -44,6 +44,7 @@ #endif #include #include +#include #include #include @@ -3393,7 +3394,7 @@ void SetTtyname(bool fatal, struct stat *st) } } - if (attach_tty) { + if (attach_tty && strcmp(attach_tty, "")) { if (stat(attach_tty, st)) Panic(errno, "Cannot access '%s'", attach_tty); -- 2.11.0