vrepper icon indicating copy to clipboard operation
vrepper copied to clipboard

Not killed in Linux

Open CrazyHeex opened this issue 7 years ago • 1 comments

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?)

CrazyHeex avatar Feb 03 '18 21:02 CrazyHeex

after you change the code and feel satisfied with the fix:

  1. make a commit. now your repository of the code is newer with modifications.
  2. start a 'pull request', to request me to pull your commit back to my original repository.

I can then determine whether to pull your commit or not.

ctmakro avatar Feb 04 '18 16:02 ctmakro