Mailing Lists: Apple Mailing Lists

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

Re: Debugging a lanuchd daemon



At 4:14 PM -0400 10/30/07, Dustin Norman wrote:
Yeah, I wasn't sure if that was new for Leopard or not. At any rate, I found a workaround for my problem that should help you too. If you put a call to pause() at the beginning of your program, it will wait for a signal.

Thanks, that did the trick (and a little more elegant than the old solution I remembered after hitting "send"):


volatile int debug_hack = 1;

while (debug_hack)
{
   sleep(1);
}

This is still semi-useful in other contexts, however (attach and set debug_hack to zero in the debugger).

Cheers,

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

This email sent to email@hidden
References: 
 >Debugging a lanuchd daemon (From: Steve Sisak <email@hidden>)
 >Re: Debugging a lanuchd daemon (From: Dustin Norman <email@hidden>)
 >Re: Debugging a lanuchd daemon (From: Steve Sisak <email@hidden>)
 >Re: Debugging a lanuchd daemon (From: Dustin Norman <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.