Re: NSTask, setStandardOutput, and setStandardError
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