Fix for writing pid with PyPy
Fix for writing pid with PyPy