pioneers / runtime

Firmware for the PiE kit robots and devices
7 stars 2 forks source link

[SYSTEMD] Implementing circular restarting of Runtime #146

Closed benliao1 closed 3 years ago

benliao1 commented 3 years ago

Much simpler change than anticipated! I think it was a combination of a typo in shm_stop.service and me adding more Before and After dependencies to the services.

I tested this and it does seem to work, if you try killing one of the processes using kill -6, it instantaneously regenerates a new instance of Runtime. The change from oneshot to simple is more of an aesthetic thing; when the processes are running now and you do systemctl status executor, for example, it will display active (running) as its status in bold green, which is pretty satisfying :P

If you want to stop Runtime completely, doing sudo systemctl stop dev_handler (or executor or net_handler) followed by rm /dev/shm/* works (stopping those services doesn't automatically trigger shm_stop.service--you have to do that manually).

Closes #144