I'm looking to execute an application that then binds to a defined port if successful, and then poll it over http, if it fails, restart it (pretty much a single-process simple watchdog). Looking at subprocess , but a bit unsure as to how to continue. Can anyone point me on a path or something?
The process has no stdin, no stdout, and no stderr (all can be discarded). Just pretty much a loop that checks if it responds (via urllib/Requests?) then sleep 30 seconds.
I'm looking to execute an application
subprocess module........................
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.