Class MyThread (threading.Thread): #this is basically where you should store all of the values Def __init__(self, value1, value2): self.value1 = value1 self.value2 = value2 Def run(self): #this function doesnt really need anything other than self, although it depends #this is basically where you call every funcion that the thread would run Function(self.value1, self.value2)

Def Function(value, value2nd): If value == 1: Print("1 first thread") If value == 2: Print("2 second thread") If value2nd == 2: Print("2 first thread") If value2nd == 1: Print("1 second thread")#define the the threads, with their arguments, for this it would be (value1, value2)Thread1 = MyThread(1, 2)Thread2 = MyThread(2, 1)#calling the threadsThread1.start()Thread2.start()

I was able to create that thread program... and now I have the same program but I need to do it with fork now...having problem for waiting for children. If a user press CTRL+C, the parent server needs to wait for children to finish and then can exit itself. Right now, it just exists right the way while a child is still connected.