[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[screen-devel] [PATCH (screen v4)] screen: don't stat("")
From: |
Christian Brauner |
Subject: |
[screen-devel] [PATCH (screen v4)] screen: don't stat("") |
Date: |
Wed, 10 May 2017 16:43:08 +0200 |
Signed-off-by: Christian Brauner <address@hidden>
---
src/screen.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/screen.c b/src/screen.c
index 8f50d76..bb2711f 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -44,6 +44,7 @@
#endif
#include <ctype.h>
#include <stdbool.h>
+#include <string.h>
#include <unistd.h>
#include <fcntl.h>
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [screen-devel] [PATCH (screen v4)] screen: don't stat(""),
Christian Brauner <=