Hi all,
I feel so excited to be back in openqnx.com almost after 10 years.
Our application is QNX7.1 running on ARM/x86 platform. In order to handle a process failure and restart it, I was familiar with the concept of HAM. But when I skim through the QNX documentation now, slm documentation says - “Similarly, when a process fails, SLM determines any dependent processes to terminate and restart, when SLM starts the process again.”
So my query is - SLM or HAM for process restarts? What is the difference and what benefits over other?
Looking forward to hearing from you soon.
Thank you,
Lullaby
I don’t know anything about SLM. A long time ago I looked into HAM. It struck me as overly complex for anything I’d ever want to do.
I’ve been doing the equivalent, monitoring a program and restarting it when it dies for a few decades. This was easy to do in all versions of QNX and all it needs is a parent process whose code consists of about 4 or 5 lines. If you don’t want a separate program, the monitor can be built into the program by forking on starutp.
A while loop, a spawn and maybe some code to prevent continuous restarting if the program continuously fails is all that is needed. Even a fancy version that writes to a log or throws up some text to the screen doesn’t complicate it very much.
Just my 2 cents here.
1 Like
Thanks a lot, @maschoen for the feedback. Got it.