title: How to see the daemon process's output in Linux?
body: <p>I wrote a test.c:</p>
  
  <pre><code>#include &lt;unistd.h&gt;
  #include &lt;stdio.h&gt;
  
  int main()
  {
      while(1)
      {
          sleep(1);
          printf("====test====\r\n");
      }
      return 0;
  }
  </code></pre>
  
  <p>then i compile it : gcc ./test.c -o ./test
  and the i wrote a shell script:</p>
  
  <pre><code>#!/bin/sh
  ./test &amp; 
  </code></pre>
  
  <p>and then i made this script to be executed automatically on system boot.
  then I login to the Linux system using secureCRT in SSH protocol.
  using "ps aux | grep test" i can see the test process running,
  but i just cannot see the test's output, some people told me because the test
  output to tty, and i am using pts.
  could anybody tell me the specific reason and how can i get the output?
  thanks in advance!</p>