• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Preferred behavior for handling NSTask's standardError
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: NSTextView retainCount weirdness
  • Next by Date: Re: "Guided tour" of sample app (was Re: Smart Group Question)
  • Previous by thread: Re: NSTextView retainCount weirdness
  • Next by thread: Re: "Guided tour" of sample app (was Re: Smart Group Question)
  • Index(es):
    • Date
    • Thread