Ticket #8 (new defect)

Opened 6 months ago

Last modified 6 months ago

Child processes don't terminate/detach (processworker)

Reported by: tobixx Assigned to: edsuom
Priority: major Milestone:
Component: AsynQueue Version:
Keywords: terminating processes Cc:

Description

When terminating the application the worker processes still stay alive.

I tried the ChildManager?.shutdown which goes to JobManager?.shutdown and then TaskQueue?.shutdown but i don't even see any code there which will shutdown the processes.

Next i tried the ChildManager?.detachChild which ends in RemoteCallWorker?.crash - i also can not see any code which will initiate such behavior - it just returns the (empty) job list.

In fact the processes stay alive and i didn't found a way to terminate them.

Is there an other way to do this - or isn't it implemented right now ?

Change History

07/02/08 07:38:25 changed by tobixx

I even tried to terminate the processes by myself - no success - with foolowing:

exit = '''
import sys, time, sched

s=sched.scheduler(time.time, time.sleep)

def exit(id_):
    s.enter(1, 1, sys.exit, ())
    return id_

'''
 
    def shutdown(self):
        dl = []
        def print_result(result):
            print "detaching result:"
            pprint(result)

        for child in self.childIDs:
            print "detaching child process", str(child)
            dl.append(self.mgr.run(self.unmarshallerJobID, 'exit', child))
        return defer.DeferredList(dl).addCallback(print_result)

result was: [(True, 1), (True, 2)]