title: Is there a way to print the PID of the process that called my C binary
body: <p>I need to know which perl script is using my C CLI.</p>
  
  <p>Using bash I can easily print "who" ran a script using:</p>
  
  <pre><code>CALLER=$(ps ax | grep "^ *$PPID" | awk '{print $NF}')
  echo $CALLER
  </code></pre>
  
  <p>Up to now I have been using this as a wrapper but it's not ideal. Is there a way to get this information from within C?</p>
  
  <p>(I'm running UNIX w/ gcc)</p>