in reply to getting values from child process

As a blanket statement, I would advise that you don’t eer expect the parent of a process (or, any other process) to have “specialized knowledge” about another process, nor to magically rendezvous with one.

If you need to obtain information from the child, have the child give it to the parent by some sharing-friendly mailbox or queue.

There are a lot of things (like this) that “look good in testing” and “seem to work okay,” that will have you fall flat on your “*” in production.   :-}