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: Xcode terminate signal



On Oct 26, 2005, at 9:55 AM, Joseph Oreste Bruni wrote:
Hm. It seems that Xcode doesn't continue to capture output to the run log from a program after the signal has been sent. (I'm catching signals and logging the shutdown.)

Thanks for the info. I'll file this as a bug with Apple.

Joe


On Oct 26, 2005, at 7:16 AM, Brendan Younger wrote:
On Oct 25, 2005, at 7:43 PM, Joseph Oreste Bruni wrote:
Does anyone know off the top of his head which signal number Xcode sends to terminate a process that is running from "Build and Run"? I can't find this documented anywhere.

SIGTERM

Are you sure this is actually accurate?

In bsd/kern/mach_process.c, in the implementation of ptrace(), which is the primary API used by GDB and for debugging in XCode, the process termination is accomplished via PT_KILL, which results in an (uncatchable) SIGKILL being set to the process.

If the detach is via PT_KILL, rather than PT_DETACH followed by an explicit SIGTERM, then there would be *NO* additional output to capture, since SIGKILL is an uncatchable signal (gdb is able to see a SIGKILL when debugging because it catches the Mach exception which happens before the SIGKILL is actually delivered, and potentially modifies the exception to avoid the SIGKILL taking effect; this is not the same as a process being able to catch its own SIGKILL).

Maybe one of the tools people can answer this for you; but if so, the best place to find them is on the "Xcode-users" list, and not this mailing list.

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

This email sent to email@hidden
References: 
 >Xcode terminate signal (From: Joseph Oreste Bruni <email@hidden>)
 >Re: Xcode terminate signal (From: Joseph Oreste Bruni <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.