pioneers / runtime

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

[CLI] Automatically attach CLIs if corresponding Runtime process is active #239

Open levincent06 opened 3 years ago

levincent06 commented 3 years ago

For all the CLIs, they spawn an instance of Runtime if not using the attach argument. It's disastrous if we accidently run CLIs without attach when Runtime is already running. For each CLI (and shm_ui), if Runtime is already running we should print a warning and perform the same behavior as if the attach argument had been set.

This may be one way to do it: https://www.unix.com/programming/146092-how-do-i-check-if-process-running-c.html