문제

I have an app that creates a friendly GUI for several command line programs, some c some python (py2app). It uses NSTask but in one instance needs to communicate with a serial usb device on /dev/cu.* and this fails with NSTask.

What is the best way to go about this? Could I write a shell script with the app and launch it from the app to start the process or would I encounter the same problem?

도움이 되었습니까?

해결책

The reason this was failing was due to my not handling the -S /dev/cu.* argument properly. While NSTask would pass -w 64 correctly to the binary it was failing with the former command so I split each element in to a separate NSTask argument and now it works fine.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top