title: Why is faketime command skipping section of code
body: <p>I have a cpp code that I'm trying to run with faketime command. I'm running it on two identical computers. They're both running RHEL 7. I noticed that when I run my code, on one computer, it totally skips my popen call.</p>
  <p>My code is essentially</p>
  <pre><code>char ntp[]= &quot;192.168.1.200&quot;;
      FILE *jitter;
      char line[100];
      char *start;
      char * eol;
      char pps[] = &quot;NTPS&quot;;
      jitter = popen(&quot;chronyc sources&quot;, &quot;r&quot;);
          int i;
  cout&lt;&lt;&quot;reached here&quot;&lt;&lt;endl;
      while(fgets(line,sizeof(line),jitter))
  {
  cout&lt;&lt;&quot;line is\n&quot;&lt;&lt;line&lt;&lt;endl;
   if(strstr(line,pps)){
          start = strpbrk(line,&quot;#0+-&quot;);    
          cout&lt;&lt;&quot;PPS is &quot;&lt;&lt;start&lt;&lt;endl; 
          //find new line character and replace it with comma
          eol = strrchr(start,'\n');
          i=eol-start;
          start[i]=',';
      
          myfile&lt;&lt;start;
      }
  
      if(strstr(line,ntp)){
          myfile&lt;&lt;start;  
      }
  }
      pclose(jitter);
  }
  </code></pre>
  <p>I added a print statement of</p>
  <pre><code>cout&lt;&lt;&quot;reached here&quot;&lt;&lt;endl;
  </code></pre>
  <p>but when I run it with &quot;faketime 'last friday 5pm' ./code&quot;, on one computer it never reaches the print statement for some reason while on the other it does. I searched online to no success (I'm not running a approximating algorithm, they have the same compiler and make file, etc. I'm literally doing a git pull of the code and running it).</p>
  <p>Does anyone know why?</p>
  <p>Thanks</p>