Add the process ID to the session header
(cherry picked from commit 825c14450da62cea527f859ef9ee3e2b73dacdb4)