David Michal wrote:
Ja teda neumim vysvetlit proc nejde exit ale co to zkusit takhle:

sysexit = False

def cleanup(signal, frame):
     """Clean up the server before shutdown.
     """
     # SIGTERM signal
     if signal == 15:
         print "Received SIGTERM signal, waiting for clients
 termination"
         while True:
             # In case that there isn't any active clients
             if not clients:
                 break
         sysexit = True

 # Nadrazena smycka:
  while not sysexit:
         # Handle the child temination
         signal.signal(signal.SIGCHLD,reap)
# Catch the SIGTERM signal
         signal.signal(signal.SIGTERM, cleanup)
         #signal.pause()
         try:
             connection,address = sock.accept()

Genialne jednoduche, jednoduse genialni. Funguje.

Diky moc.

Lumir

--
Lumír Jasiok
VSB-TU Ostrava - Computer centre
Tel: +420 59 732 3189
E-mail: [email protected]
http://www.vsb.cz
                                                                                
                                        

_______________________________________________
Python mailing list
[email protected]
http://www.py.cz/mailman/listinfo/python

Odpovedet emailem