I do not have the source code to the subprocess, so I think I will need to find another solution. I can't call setvbuf from my code, can I?

I am using the TaskWrapper class from the Moriarity sample for my task handling. It is pretty old, maybe it is not compatible with Leopard or Xcode 3?

As an experiment, I tried calling ttyname in my code, but it returns null in both the Xcode and Finder launched cases.

I am moving this line of questioning over to the Xcode list, since it seems more Xcode related than Cocoa related.

On Sep 2, 2008, at 11:05 PM, [EMAIL PROTECTED] wrote:


Anyone have any ideas what to look at here? I am using an NSTask
wrapper class (TaskWrapper) I adapted from the Moriarity sample to
do the sublaunch and monitoring stuff. ( I have a fix for it under
Leopard which I will report on later, just to try to put something
back into the pot.)

It sounds like your subprocess is buffering its output.  See the
setvbuf man page.  Until the subprocess writes enough to fill its
buffer, it won't put anything on the pipe.  When the process shuts
down, it flushes all of its buffers.

Xcode may have convinced the subprocess that its output is to a tty,
which is line buffered rather than block buffered.  I'm not sure why
that would happen since you are (or should be) controlling the nature
of the subprocess's output.

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to