소스 검색

Opening port fix

Pavel Yurchenko 11 달 전
부모
커밋
646184e5dd
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Sources/SwiftSerial/SerialPort.swift

+ 1 - 1
Sources/SwiftSerial/SerialPort.swift

@@ -44,7 +44,7 @@ public class SerialPort {
 		#if os(Linux)
 		fileDescriptor = open(path, readWriteParam | O_NOCTTY)
 		#elseif os(OSX)
-		fileDescriptor = open(path, readWriteParam | O_NOCTTY | O_EXLOCK)
+		fileDescriptor = open(path, readWriteParam | O_NOCTTY | O_EXLOCK | O_NONBLOCK)
 		#endif
 
 		// Throw error if open() failed