• 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
Re: Hello. Is there a way to stop Apple CrashReporter from collecting crashes of my process?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hello. Is there a way to stop Apple CrashReporter from collecting crashes of my process?


  • Subject: Re: Hello. Is there a way to stop Apple CrashReporter from collecting crashes of my process?
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 11 Jul 2016 13:48:12 -0500

On Jul 11, 2016, at 11:44 AM, Alastair Houghton <email@hidden> wrote:
>
> On 11 Jul 2016, at 15:04, Motti Shneor <email@hidden> wrote:
>>
>> I develop a global daemon, maintained by launchd. Obviously It cannot be distributed in the Mac App Store. To collect crash-reports from customers, I integrated a mainstream 3rd party crash reporter library (PLCrashReporter). I collect crashes of our daemon, and send them for analysis,  and all is well.
>>
>> However, when crash happens, the user can still see a line in the Console “All Messages” section, and also see the full crash-report in the “System Diagnostic Reports”. I would want to avoid this, and disable this crash-reporting that is unusable to me, and exposes private info about my program  (I’m writing a security tool).
>>
>> I could not find any process-specific behavior of CrashReporter. The only thing I could find is how to stop the crash-reporter altogether from collecting crashes. (see man ReportCrash) - and of course I don’t want this.
>>
>> Is it possible at all to stop CrashReporter from collecting just MY crashes? how? Is there a runtime API (xpc or other) to control CrashReporter behavior? Any filtering mechanism?
>
> This isn’t really a Cocoa question (you might be better off with the Darwin list), but AFAIK CrashReporter works by connecting to your program’s Mach exception port.  Since you’re using it, I’ll note that PLCrashReporter can be set to take over the exception port, but if you look in mach_exception_callback() it forwards crash reports to previously registered handlers, which you probably don’t want.

You can prevent Crash Reporter from generating crash reports for your process by handling all signals that would normally terminate the process and call _exit() from the handler.  You can also set the Mach exception ports to MACH_PORT_NULL.

See:
<http://lackingrhoticity.blogspot.com/2013/08/handling-crashes-on-mac-os-x.html>
<https://lists.apple.com/archives/cocoa-dev/2009/Sep/msg01640.html>

Regards,
Ken


_______________________________________________

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


References: 
 >Hello. Is there a way to stop Apple CrashReporter from collecting crashes of my process? (From: Motti Shneor <email@hidden>)
 >Re: Hello. Is there a way to stop Apple CrashReporter from collecting crashes of my process? (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: Hello. Is there a way to stop Apple CrashReporter from collecting crashes of my process?
  • Next by Date: Universal Clipboard scope
  • Previous by thread: Re: Hello. Is there a way to stop Apple CrashReporter from collecting crashes of my process?
  • Next by thread: Universal Clipboard scope
  • Index(es):
    • Date
    • Thread