• 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
NSTask vs. BSD API (was: Talking to the Dock)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTask vs. BSD API (was: Talking to the Dock)


  • Subject: NSTask vs. BSD API (was: Talking to the Dock)
  • From: Creed Erickson <email@hidden>
  • Date: Tue, 29 Jul 2003 11:02:08 -0700

On Tuesday, July 29, 2003, at 08:12 AM, Sailor Quasar wrote:

But yes, if you don't care about subtle changes in the output of "top" or "ps" screwing up your parsing, and you enjoy writing parsers that take apart information that can be received already dissected from a system API, and you don't care about it taking a little longer, NSTask is a solution as well.

"Subtle changes" in the output of those commands would break a great many more things than someone's use of NSTask. The output and options of the BSD 'ps' command are well-known and long-standing. There have been extensions, but never any that changed the basic structure of the output. (Disclaimer: this is in my own knowledge only; someone more versed in UNIX history may feel free to correct me :).


Not to mention that the output format of PS can be specified on the command line.

However, while 'ps' is not as gratuitous an example as others may be, I do agree that using API is a generally a more robust, lighter weight solution to launching a command line utility via NSTask.

It seems questions with no NS* framework answer too often invoke "NSTask and parse the output" responses from this list.

---
Creed Erickson <email@hidden>
"Not a shred of evidence exists in favor of the idea that life is serious."
- Brendan Gill
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: Talking to the Dock (From: Sailor Quasar <email@hidden>)

  • Prev by Date: Re: Bypassing the print dialog box
  • Next by Date: Re: Custom Sheets
  • Previous by thread: Re: Talking to the Dock (Nooo - stop it!)
  • Next by thread: Re: Talking to the Dock
  • Index(es):
    • Date
    • Thread