I am building a rust application, when the application is running, I want to set an OS level flag (an ENV variable) saying.. MY_CUSTOM_APP_RUNNING=true and set it to false when application stops!
Also, My application has 3 different features, I want my application to listen to the flag changes.
For example, if I run export MY_CUSTOM_APP_FEATURE_1=enable, my application should listen to this change.
Are these 2 things possible? How should I approach to do this?
It would be a cherry on top, if I could do this for all OS!