how to pause a forked process

Laurent POINTAL pointal at lure.u-psud.fr
Mon Jun 19 07:54:54 EDT 2000


On Thu, 15 Jun 2000 10:17:40 -0600, j vickroy <jvickroy at sec.noaa.gov>
wrote:

>: Hello,
>: 
>: How can execution be paused in a child process?
>: 
>: This is what I tried:
>: 
>: import os
>: import time
>: 
>: pid = os .fork()
>: 
>: if pid == 0: # child
>:     # do some work
>:     time .sleep (5)
           ^ Is there really a space here?
>: 
>: else: # parent
>:     # do some work
>: 
>: The sleep() call is flagged as:
>:     AttributeError: sleep


---
Laurent POINTAL - CNRS/LURE - Service Informatique Experiences
Tel/fax: 01 64 46 82 80 / 01 64 46 41 48
email  : pointal at lure.u-psud.fr  ou  lpointal at planete.net 



More information about the Python-list mailing list