Re: cocoa-dev digest, Vol 2 #150 - 16 msgs
Re: cocoa-dev digest, Vol 2 #150 - 16 msgs
- Subject: Re: cocoa-dev digest, Vol 2 #150 - 16 msgs
- From: Simon Stapleton <email@hidden>
- Date: Wed, 06 Feb 2002 16:02:52 +0000 (GMT)
>
Subject: Interacting with an NSTask via pipes
>
From: Tony Gray <email@hidden>
To set a filedescriptor to non-buffering, you might be able to use
the fcntl call.
Something like this, IIRC. YMMV. Untested.
#include <fcntl.h>
...
int flags;
int fd = [myFileHandle fileDescriptor];
flags = fcntl (fd, F_GETFL, 0);
if (flags == -1) {
//Handle Error Here
}
flags |= O_NONBLOCK;
fcntl (fd, F_SETFL, flags);
...
You may have to assign the filehandle to the process before this, or
afterwards. I forget. But it should work, I think.
Simon
--
PGP Key ID : 0x50D0698D
--
If the answer isn\'t obvious, the question is a distraction. Go find
an easier question.
_______________________________________________
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.