Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSFileHandle and FIFO files



I'm attempting to use named pipes (which are reffered to all over the place on developer.apple.com but mysteriously never explained how to use alongside your cocoa code), and I wanted to create one, then use an NSFileHandle to see when it is updated (like with [NSPipe fileHandleForReading]).  However, this 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];

Does anyone know how to use named pipes with Cocoa, either with what I've done above or whatever method may work.  I've been looking for some sort of documentation all night with no avail.

Thanks!

Francisco Tolmasky
www-scf.usc.edu/~tolmasky


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.