Question

I have a cloud process which downloads certain files to the cloud. How can I let my mother process know about success or failure to do some clean up work if required?

Should I be using semaphores?

Oh an something else, my cloud process never ends, so I can't exercise a .join()

Was it helpful?

Solution

Assuming the mother process spawns the child process(es), the child process can exit with a success/failure code. The code determines if cleanup is required. Then the mother process spawns a new child process. See subprocess for info.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top