• 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
Re: NSTask, setStandardOutput, and setStandardError
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask, setStandardOutput, and setStandardError


  • Subject: Re: NSTask, setStandardOutput, and setStandardError
  • From: email@hidden
  • Date: Thu, 25 Oct 2001 19:41:06 +0200

On Thursday, October 25, 2001, at 07:23 PM, Chilton Webb wrote:

I assume that NSTask reroutes printf to setStandardOutput.

I'd like to respond to events from within my server tool without using printf. Again, I assume that some call to an error function would allow me to communicate with my cocoa shell via setStandardError. Is this correct? If so, which function do I need to call from within my c tool?

Question v.2:
I'm assuming that setStandardOutput is what a call to printf would send data to.
what function (from within a c tool) would I need to call to send data to setStandardError?

You can use fprintf or fputs with stderr as the file;

fprintf(stderr,"%s %s%c","Hello","world",'!');

fputs("Hello world!",stderr);



Regards,
John Hornkvist
--
ToastedMarshmallow, the perfect Cocoa companion
http://www.toastedmarshmallow.com


References: 
 >NSTask, setStandardOutput, and setStandardError (From: Chilton Webb <email@hidden>)

  • Prev by Date: Help with NSTableView
  • Next by Date: TN2029 and headers
  • Previous by thread: NSTask, setStandardOutput, and setStandardError
  • Next by thread: Help with NSTableView
  • Index(es):
    • Date
    • Thread