• 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: NSFileHandle and FIFO files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSFileHandle and FIFO files


  • Subject: Re: NSFileHandle and FIFO files
  • From: Fritz Anderson <email@hidden>
  • Date: Wed, 1 Jun 2005 14:01:50 -0500


On 1 Jun 2005, at 1:16 AM, Francisco Tolmasky wrote:

[T]his hangs my app, apperantly because NSFileHandle doesn't like FIFO files created as so:

NSLog(@"[%d]",mkfifo([path cString], 0644));
fileHandleForReading= [[NSFileHandle fileHandleForReadingAtPath: path] retain];

As I understand it, an open() on one end of a FIFO blocks until some other process open()s the other end. I'd suggest either accepting the blocking behavior, or doing an open() with the O_NDELAY flag set, and passing the resulting file descriptor to -[NSFileHandle initWithFileDescriptor:] (or the variant that allows the NSFileHandle to close the descriptor).


    -- F

 --
Fritz Anderson
Consulting Programmer
http://resume.manoverboard.org/


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: how do you change the highlight color for rows in an NSOutlineView?
  • Next by Date: Core Data Drag and Drop with Tree Controller
  • Previous by thread: Re: how do you change the highlight color for rows in an NSOutlineView?
  • Next by thread: Core Data Drag and Drop with Tree Controller
  • Index(es):
    • Date
    • Thread