fix process guard

check if process group id is in our list of spawned process groups
oops i mixed up pgid_list and pgid_dict.. fixed and cleaned up PR

can you check if this works for you? i couldn't reproduce your issue at my PC so difficult to test