Friends
I have found that if a programme kicked off from the Pi Sound button goes into an infinite loop then sudo systemctl stop pisound-btn
does not kill the programme
Friends
I have found that if a programme kicked off from the Pi Sound button goes into an infinite loop then sudo systemctl stop pisound-btn
does not kill the programme
What is the output of systemctl status pisound-btn.service
?
It stops.
That is how I found the problem.
I am writing from memory, I fixed my programme with the infinite loop. Would it be useful to get it back and test?
It is not a huge problem, killing the programme tat owns the loop fixes it.
It was never the intention that stopping pisound-btn.service would stop the child processes, they were always considered detached, so in that sense, it works by design. But I think there are some systemd properties that could be enabled that would stop and kill all the processes created by this service.
That is not it. I was not clear
The problem is the child process hangs (in an infinite loop) the button becomes unresponsive
Yes, you should start the child process in the background mode, by ending the command (usually the very last line in the script) with the ‘&’ symbol. Here’s an example.