<s> """<STR_LIT>""" <EOL> import os <EOL> import sys <EOL> import signal <EOL> import time <EOL> import math <EOL> import random <EOL> child_processes = <NUM_LIT:3> <EOL> dead_processes = <NUM_LIT:0> <EOL> def do_work ( ) : <EOL> time . sleep ( <NUM_LIT:3> ) <EOL> for _ in range ( child_processes ) : <EOL> pid = os . fork ( ) <EOL> if pid == <NUM_LIT:0> : <EOL> do_work ( ) <EOL> os . _exit ( <NUM_LIT:0> ) <EOL> else : <EOL> print "<STR_LIT>" , pid <EOL> def wait_children ( signum , frame ) : <EOL> global dead_processes <EOL> print "<STR_LIT>" <EOL> os . wait ( ) <EOL> dead_processes += <NUM_LIT:1> <EOL> if dead_processes == child_processes : <EOL> print "<STR_LIT>" <EOL> sys . exit ( ) <EOL> signal . signal ( signal . SIGCHLD , wait_children ) <EOL> while True : <EOL> math . floor ( math . sqrt ( random . randint ( <NUM_LIT:1> , <NUM_LIT> ) ** <NUM_LIT:8> ) ) <EOL> time . sleep ( <NUM_LIT:1> ) </s>
