Well ... on *nix systems, you cannot reliably do this. Sure, you can get the current process pid, look up the parent pid in the process table and then check the name of the parent process ... but you see, the name of a process is easily spoofed. What exactly are you trying to accomplish? There may be better ways (sudo) to accomplish what you really need.
In reply to Re: Detect name and path of calling script
by derby
in thread Detect name and path of calling script
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |