Add a test for process launched twice by PD.

Also test that cleanup works