title: Script for modifying behavior of running C program
body: <p>I have a situation where I submitted jobs that have been running for five days but due to a bug introduced all the work could be lost. I made a 'system' call to compress the data file and then remove the original uncompressed file that could be as big as 4G. So I have this in the C code</p>
  
  <pre><code>    strcpy(command,"data"); ////I should added a forward slash here "data/"
      sprintf(command,"%scompress -c -i %s -o %s",command,name,out_name);
      system(command);
      remove(name); /////This is the problem
  </code></pre>
  
  <p>The bug is in the sprintf line, in which what I wanted to do was to call a program in data/compress, but due to the missing '/' the system command fails. And thus the data produced is not compressed AND then immediately the original file is DELETED leaving me with nothing! If it was compressed it would have been OK.</p>
  
  <p>There are currently five running jobs in such a state. I need to divert this behavior somehow so that I don't lose five days work. I am thinking to  create a fake script named 'datacompress' in the current directory to change the behavior of the running program. Can I do this or are there better options, if at all? </p>