Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top