I have a program that spawns multiple child processes, how would I make the program only call atexit.register(function) on the main process and not on the child processes as well?
Thanks
I have a program that spawns multiple child processes, how would I make the program only call atexit.register(function) on the main process and not on the child processes as well?
Thanks
The functions registered via atexit are inherited by the children processes.
The simplest way to prevent that, is via calling atexit after you have spawned the children processes.