Skip to content
  • Benjamin Berg's avatar
    gspawn: Fix pypy Pid deallocation and double close_pid call · 563c2e2b
    Benjamin Berg authored and Arjan Molenaar's avatar Arjan Molenaar committed
    Calling PyLong_AsLong resurrects the underlying python object again,
    which is something that PyPy is not liking. In addition to this, the
    code would call g_spawn_close_pid twice if the user did explicitly call
    the close method. This method does not make any sense, but it is
    exported already so probably should be left as-is.
    
    Add an internal copy of the GPid to the object that is set to 0/NULL
    when it is closed. Having this both avoids the double close_pid call and
    also avoids the need of resurrecting the object when freeing it.
    563c2e2b