2 # vim: set et sw=4 sts=4 ts=4
4 import os, time, sys, random
9 random.seed(time.time())
10 timeout = int(random.random() * 30)
12 print "HIJO: Voy a esperar", timeout, "segundos"
16 if __name__ == '__main__':
17 for i in xrange(int(sys.argv[1])):
19 for i in xrange(int(sys.argv[1])):
20 (pid, status) = os.wait()
21 timeout = os.WEXITSTATUS(status)
22 print "PADRE: Termino", pid, "despues de esperar", timeout, "segundos"