JohnSundell / ShellOut

Easily run shell commands from a Swift script or command line tool
MIT License
870 stars 83 forks source link

Capture available data early #42

Closed helje5 closed 4 years ago

helje5 commented 5 years ago

The availableData object should be captured in the event handler. If you delay reading the data to the synchronization queue, the pipe may be closed already (leading to an ObjC exception you can't catch).