Bi-directional pipe with AuthorizationExecuteWithPrivileges
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