• 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
Bi-directional pipe with AuthorizationExecuteWithPrivileges
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bi-directional pipe with AuthorizationExecuteWithPrivileges


  • Subject: Bi-directional pipe with AuthorizationExecuteWithPrivileges
  • From: Sidney San Martín <email@hidden>
  • Date: Thu, 12 Mar 2009 12:13:02 -0400

I'm trying to figure out how to work with **communicationsPipe provided by AEWP. I figured out how to send data to of from the called process by creating an NSFileHandle:

NSFileHandle *helperInputHandle = [[NSFileHandle alloc] initWithFileDescriptor:fileno(rawPipe) closeOnDealloc:YES]
// Write some data
[helperInputHandle dealloc]


And on the other end I can do the same and just readDataToEndOfFile:

NSFileHandle *stdinHandle = [NSFileHandle fileHandleWithStandardInput];
NSData *stdinData = [stdinHandle readDataToEndOfFile];

But I can't figure out how to go both ways. There's only one handle, so once I close it I can forget about reading any data that comes back. Anyone done this before? Suggestions?
_______________________________________________


Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Prev by Date: Copy of NSDictionary is cleared when the original is cleared. Why?
  • Next by Date: Re: Garbage collected and non-garbage collected
  • Previous by thread: Copy of NSDictionary is cleared when the original is cleared. Why?
  • Next by thread: [MEET] CocoaHeads-NYC meeting Thu 03/12
  • Index(es):
    • Date
    • Thread