Agree, but I think it's also a good practice to guard against known cases that are prone to crashes.
On Tue, Jul 22, 2025 at 09:01:42PM +0500, Khadem Ullah wrote:
> Thanks for the follow up.
> Understood. That makes sense. However, I’d like to highlight that
> applications should ideally be robust and interactive enough to handle
> all edge cases where a segfault or unexpected error might occur. While
> clear documentation is certainly important, relying solely on it may
> not be sufficient. In my view, potential segfaults should be handled
> explicitly in code to ensure stability and to prevent silent failures,
> especially in production environments.
>
In fairness, where stability is the main concern, I'd generally recommend
avoiding multi-process entirely. Or, if it has to be used, the primary
process should be a minimal slim one, that sets up the ports and memory and
thereafter sleeps so that it should never crash unexpectedly!
Even with that, if any secondary process dies, you'll still have all the
buffers in use by that secondary process leaked, so for any multiprocess
system the only safe behaviour for the system is to restart all processes
if any process unexpectedly terminate.
/Bruce
--
Engr. Khadem Ullah,
Software Engineer,
Dreambig Semiconductor Inc