سؤال

I'm using NSTask and NSPipe to execute a command and asynchronously get its output.

The code I'm using is almost 100% the same as in my question, here (with the fixes included).

However, while I'm testing it, I noticed that some times, the NSTaskDidTerminateNotification comes several milliseconds BEFORE the last NSFileHandleReadCompletionNotification.

In other words, the seemingly dead task is sending me data AFTER it has been terminated.

What's going wrong? Any ideas?

هل كانت مفيدة؟

المحلول

As @ughoavgfhw mentioned : it turns out there really was no issue.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top