There is an all-in-one server on python. Tasks are divided into processes. Can not manage them in windows. The application forks, and after that they can not be completed normally.

setup() puts multiprocessing.Process(target=worker) instances in services

 def main(args=None,daemon=False): import signal,os services = [] def start(*a): for proc in services: proc.daemon=True proc.start() def kill(*a): for proc in services: debug('terminate %s' % proc.name) proc.terminate() def wait(n=1): for proc in services: proc.join(n) setup(services,args=args) start() while True: try: wait() except Exception as e: logger.error(e) break kill() 

With ctrl + c figured out - ctrl + break.

At the end of the main process, I expect that in a second the children will begin to complete. An exception should be proc.join(n) on proc.join(n) further breaking the while and kill. But the child processes remain to work.

On Linux finishes correctly.

  • "press ctrl + c" - click where? - VTT
  • in console, where else? - eri
  • Are these child processes attached to this console? Do they get Ctrl + C? And is it treated? Normal completion usually implies the existence of an IPC mechanism to send a command to the processor to exit. Does your application have such a mechanism? - VTT
  • Child processes attached to the console will not work and do not. event gets a parent and makes everyone terminate - eri
  • Why IPC? just send a signal and catch it - eri

0