title: How can I tell if a script was run in the background and with nohup?
body: <p>Ive got a script that takes a quite a long time to run, as it has to handle many thousands of files.  I want to make this script as fool proof as possible.  To this end, I want to check if the user ran the script using nohup and '&amp;'.   E.x. 
  <code>me@myHost:/home/me/bin $ nohup doAlotOfStuff.sh &amp;</code>.   I want to make 100% sure the script was run with nohup and '&amp;', because its a very painful recovery process if the script dies in the middle for whatever reason.  </p>
  
  <p>How can I check those two key paramaters inside the script itself? and if they are missing, how can I stop the script before it gets any farther, and complain to the user that they ran the script wrong?  Better yet, is there way I can force the script to run in nohup &amp;?</p>
  
  <p>Edit: the server enviornment is AIX 7.1</p>