title: Using nohup to send process to the background
body: <p>I have this script in php</p>
  
  <pre><code>&lt;?php
      error_reporting(E_ALL &amp; ~E_NOTICE);
      require ('config.php');
      require ('db_class.php');
      $db = new MySQLDatabase;
  
  $row = 1;
  if (($handle = fopen("27k.csv", "r")) !== FALSE) {
      while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
          $num = count($data);
          //echo "&lt;p&gt; $num fields in line $row: &lt;br /&gt;&lt;/p&gt;\n";
          $row++;
          for ($c=0; $c &lt; $num; $c++) {
             // echo $data[$c] . '&lt;br/&gt;';
  
      $jsonString = file_get_contents('php://input');
      $decoded = json_decode($jsonString, true);
  
      $phone = $data[$c];
      $msg = 'Bulk message';
      $time = date('Y-m-d H:i:s');
  
      $sql="insert into UNITED.dbo.ozekimessageout (sender,receiver,msg,msgtype,status,flag,scheduledtime) 
                                    values ('NOW SMS','".$phone."','".$msg."','SMS:TEXT','Send','1','".$time."')";
      $db-&gt;query($sql);
          }
      }
      fclose($handle);
  }
  
  ?&gt;
  </code></pre>
  
  <p>I named the script <code>csv.php</code> and sent this to process in the background with <code>nohup php csv.php &amp;</code>.</p>
  
  <p>The csv file i am reading has 10,000 records. Will the script stop inserting in the database after 10,000 records or will it continue executing even after 10,000 records are inserted?.</p>