Modify control script to report pid