Skip to content

Not killed in Linux #2

@CrazyHeex

Description

@CrazyHeex

After inst end, the child process is not killed. (this is weird but it only killed the vrep.sh instead of the whole thing.)

fixed by change:

def end(self):
    print('(instance) terminating...')
    if self.isAlive():
        pid = self.inst.pid
        parent = psutil.Process(pid)
        for _ in parent.children(recursive=True):
            _.kill()
        retcode = parent.kill()
        # self.inst.terminate()
        # retcode = self.inst.wait()
    else:
        retcode = self.inst.returncode
    # print('(instance) retcode:', retcode)
    return self

p.s: not a neat fix, but works

issue 2:
need the get_global_variable
fixed in my code (my fork is not the latest since I just copied the core.py to my project.)

I'm new to open source community so I'm not so sure how this github thing works(like how to request a merge?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions