Preferred behavior for handling NSTask's standardError
Preferred behavior for handling NSTask's standardError
- Subject: Preferred behavior for handling NSTask's standardError
- From: Ken Tozier <email@hidden>
- Date: Fri, 8 Jul 2005 01:29:03 -0400
I'm writing a class to encapsulate the running of command line tools
and found that some tools (such as "locate") actually don't work when
using mode "readToEndOfFileInBackgroundAndNotify "and setting the
standardError pipe in NSTask.
The documentation for readToEndOfFileInBackgroundAndNotify (and it's
corresponding notification
NSFileHandleReadToEndOfFileCompletionNotification) indicates that it
passes back a dictionary with two properties
"NSFileHandleNotificationDataItem" and "NSFileHandleError" which is
great, but is it safe to eliminate the "setStandardEdrror" pipe of
NSTask for all cases?
Basically what I'm wondering is which would be the preferred behavior:
Provide users of my class with a mechanism to handle errors?
Or just go the easy route and let NSTask post errors to
standardError on it's own?
Thanks,
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden