ERRATUM:
seen out of context, that part of the patch is deceptive and misleading at first glance, but I am pretty certain it is correct. This is part of the make_internal_message() function. Notice the existing call to getpid() a few lines up where self->msg is being constructed.
Correct again. Sorry for not checking more closely; you're right, the patchlet was misleading, not enough context. However, I think the getpid() call could be cached, as it's "quite" slow on a lot of systems and calling it for each internal queued message is unnecessary.
And I'm wrong again, your patch does everything in a perfect way. It (the initial self pointer struct) is only filled up once at invocation. It wouldn't hurt my judgment to check the source from time to time ... My apologies, Roberto Nibali, ratz -- echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq'|dc