title: Jobs Started from .profile getting killed
body: <p>Jobs which are triggered from OS Users <code>.profile</code> are getting killed after <code>Putty</code> Session is closed/exitted.</p>
  
  <p>From the OS User "user1" jobs are triggered in application using <code>sudo</code> login to application id "app1".</p>
  
  <ol>
  <li><p>.profile of user1</p>
  
  <pre><code>set -o vi
  mesg y
  export PS1='$LOGNAME-$PWD&gt;'
  export APP_GRP=ALL
  ./app_menu
  exit
  </code></pre></li>
  <li><p>in app_menu script 
  app_menu is triggered from user1 which logs in to Application ID "app1"</p>
  
  <pre><code>sudo -u app1 -i run_jobs.sh
  </code></pre></li>
  <li><p>run_jobs.sh</p>
  
  <pre><code>nohup jobname&gt;/dev/null &amp;
  pid=$!
  echo $pid
  wait $pid
  </code></pre></li>
  <li>JobName submits a process in <code>background</code> and completes. This running jobs is the main application job. 
  Now there is no issue till the putty session of the user1 is active. Once this <code>session</code> is <code>closed/timed out</code> the running process is <code>killed</code> automatically.</li>
  </ol>
  
  <p>When the jobname is submitted directly to the app1 user from normal shell terminal using <code>nohup sudo -u app1 -i jobname&gt;/dev/null &amp;</code> , there is no issue.</p>
  
  <p>Everytime the process is started using .profile , it is killed upon exiting the putty.</p>
  
  <p>Have tried all the background options . </p>
  
  <p>Please suggest solutions.</p>