Ham trouble

I’m trying to write a HAM application, first time. All I want to do is to get a notification when a proces, any process dies of horible death: sigsegv.

I read the whole ham doc twice now and I can’t wrap my brain around it. Phrase like “an entity’s death is detected for all processes” don’t make sense to me.

Suggestions welcome.

  • Mario

The term entity is used because a process can be replaced after a failure (or some other cause) so
it doesn’t make sense to use the term process.

In general there are only a couple of ways to monitor for death of a process:

  1. If something in session 0 dies (ie a server), you will get a notification if you use procmgr_notify()
  2. If something you spawed dies, you will get a notification because of parent/child session relationship
  3. If you are a server (like HAM is) and a client connection goes away you can detect that.

Those three basic principles map to the different types of monitored entities. Depending on what
you control about the process you want to monitor for “dying a horrible death” you will need to
incorporate it with the HAM as appropriate.

In essence you will want to run ham_attach() with your process that you want to monitor and
then set up an action as appropriate for the abnormal death.

Would be nice if procmgr_event_notify would support notification of not just session 1 process.

I mean it seems overly complicated to just be able to watch for any process death, think like photon for example that aren’t run in session 1 just to name a few.

If dumper can do it why can I ?