소스 검색

remove nonblock flag to prevent massive cpu usage during reading. Will require use of /dev/cu.* only

Yeo Kheng Meng 9 년 전
부모
커밋
02e0d4837e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Sources/SwiftSerial.swift

+ 1 - 1
Sources/SwiftSerial.swift

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