• 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
hung in read$UNIX2003
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hung in read$UNIX2003


  • Subject: hung in read$UNIX2003
  • From: Michael Domino <email@hidden>
  • Date: Fri, 3 Apr 2009 09:36:22 -0400

Hi all,

I have a task prepared and launched with the code below, and when it returns (in this situation that status code returned from terminationStatus is 0), it hangs in availableData, never to return. The stack at this point is very deep because of a recursive function (see the stack trace below), which might be a factor in this hanging problem. Could this be a problem with the stack depth? This code functions perfectly most of the time.

				messagePipeError = [NSPipe pipe];
				messagePipeOutput = [NSPipe pipe];
				[task setLaunchPath:@"/usr/bin/hdiutil"];
				[task setArguments:[NSArray arrayWithObjects:@"info", nil]];
				[task setStandardError:messagePipeError];
				[task setStandardOutput:messagePipeOutput];
				[task launch];
				[task waitUntilExit];
				status = [task terminationStatus];

NSData *messageDataError = [[messagePipeError fileHandleForReading] availableData];
messageError = [[[NSString alloc] initWithData:messageDataError encoding:NSUTF8StringEncoding] autorelease];


This is the stack:

0 read$UNIX2003
1 NSReadFromFileDescriptor
2 -[NSConcreteFileHandle availableData]
3 MyFunction
.
.
.
221 PThread::run
222 PThread::threadFunction
223 _pthread_body

The code the debugger shows in read$UNIX2003:

<+0000> mov $0xc0003,êx
<+0005> call   0x93d38a14 <sysenter_trap>
<+0010> jae   0x93d5beea <read$UNIX2003+26>    <<<<< hung here
<+0012> call   0x93d5bee1 <read$UNIX2003+17>
<+0017> pop  íx
<+0018> mov  0xcce61df(íx),íx
<+0024> jmp  *íx
<+0026> ret

Michael Domino
email@hidden



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Follow-Ups:
    • Re: hung in read$UNIX2003
      • From: Michael Ash <email@hidden>
  • Prev by Date: Re: Dismissing the iPhone keyboard
  • Next by Date: Inserting text in UITextView without scrolling animation
  • Previous by thread: Re: Dismissing the iPhone keyboard
  • Next by thread: Re: hung in read$UNIX2003
  • Index(es):
    • Date
    • Thread