• 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: cocoa-dev digest, Vol 2 #150 - 16 msgs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: NSDocument: File attributes for backup file?
  • Next by Date: Re: Transparent Button
  • Previous by thread: Re: " in a string (newbie)
  • Next by thread: NSMovie and resizing
  • Index(es):
    • Date
    • Thread