Change pid detection after fork