is it possible to restart the already terminated process in python multiprocessing?
Question: Here is the example code for my question:

    
    
    import multiprocessing, time
    def nopr():
            i=0
            while 1:
                    i = i+1
                    print i
                    time.sleep(1)
    
    p = multiprocessing.Process(target =  nopr)
    print "process started"
    p.start()
    time.sleep(04)
    print "process ended"
    p.terminate()
    time.sleep(1)
    
    
    p.start()
    


Answer: No you cannot start a terminated process, you would have to recreate it :

    
    
    import multiprocessing, time
    def nopr():
        i=0
        while 1:
            i = i+1
            print i
            time.sleep(1)
    
    p = multiprocessing.Process(target =  nopr)
    print "process started"
    p.start()
    time.sleep(04)
    print "process ended"
    p.terminate()
    time.sleep(1)
    
    p = multiprocessing.Process(target =  nopr) # recreate
    p.start()
    

