I'm using supervisord for managing process.
(To avoid zombie process, and other difficult thing to manage process)
Assume that I will run python script that using multiprocessing.
from multiprocessing import Process
import time
def fetch():
while True:
time.sleep(1)
print("I'm still alive...")
def main():
processes = [
Process(target=fetch),
Process(target=fetch),
Process(target=fetch),
Process(target=fetch),
Process(target=fetch),
Process(target=fetch),
Process(target=fetch),
Process(target=fetch),
[And more process here...]
]
for process in processes:
process.start()
main()
Above code, fetch()
create many processed and run it.
In this case, if processes that created by fetch()
become zombie process,
supervisord managing it?(ex. Auto kill and restart)
Or, just managing root process only?
Thanks.