Normally a process has a CSID equal to it's own Pid. However, when processes become orphaned they acquire the subtree Id of their original parent and become adopted by their grand-parents by acquiring their grand-parents's Pid as their new parent Pid.
Refer to the following for more detailed information