• 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
piped unzip (and this time it's not the wrong codesnipper)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

piped unzip (and this time it's not the wrong codesnipper)


  • Subject: piped unzip (and this time it's not the wrong codesnipper)
  • From: Stefan Fisk <email@hidden>
  • Date: Wed, 18 Feb 2004 21:46:52 +0100

hi again all!

i already knew that i had to clear the pipe, but even when i do that it doesn't work, i just get: Exception raised during posting of notification. Ignored. exception: *** -[NSConcreteFileHandle readDataOfLength:]: Interrupted system call

- (NSData *)dataForKey:(NSString *)key {
NSTask *zip = [[[NSTask alloc] init] autorelease];
[zip setArguments:[NSArray arrayWithObjects:@"-p", path, key, nil]];
[zip setLaunchPath:@"/usr/bin/unzip"];
NSPipe *outputPipe = [NSPipe pipe];
[zip setStandardOutput:outputPipe];
[zip launch];

NSData *data = [[outputPipe fileHandleForReading] readDataToEndOfFile];
[zip waitUntilExit];

if ([zip terminationStatus] != 0)
return nil;
else
return data;
}

this is all really bugging me to no end, i know it's easy =)
_______________________________________________
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: generate HTML from a NSAttributedString
  • Next by Date: Re: display an image in a button
  • Previous by thread: generate HTML from a NSAttributedString
  • Next by thread: Re: piped unzip (and this time it's not the wrong codesnipper)
  • Index(es):
    • Date
    • Thread