Blob Blame History Raw
From 394466f19aeaa9bc8c86c110585622c766dc2d8e Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon, 17 Mar 2014 08:00:45 +1000
Subject: [PATCH 05/14] tools: open serial devices with O_NOCTTY

Probably doesn't make much difference, but won't hurt if we ever send the
wrong path name.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
 tools/isdv4-serial-debugger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/isdv4-serial-debugger.c b/tools/isdv4-serial-debugger.c
index 47c6896..72b9b4f 100644
--- a/tools/isdv4-serial-debugger.c
+++ b/tools/isdv4-serial-debugger.c
@@ -74,7 +74,7 @@ int open_device(const char *path)
 	struct serial_struct ser;
 
 	TRACE("Opening device '%s'.\n", path);
-	fd = open(path, O_RDWR);
+	fd = open(path, O_RDWR | O_NOCTTY);
 
 	if (fd < 1)
 		perror("Failed to open device file");
-- 
1.8.5.3