I am using two scripts parent.py
and child.py
where the parent process executes the child script and waits for its completion. I would like to identify the name of parent script from child. This is to ensure security, that child is being called by the correct parent script.
I have tried solutions using os library present at this question. However, the solutions present in that question can be mocked using setproctitle library. I would like to know if there is a way to do the same which cannot be mocked.
Thanks in advance.