title: linux c++ libev official example show redundant console behavior
body: <p>I just tried the official example of libev, like below. After compiling and running, I see once I input anything from stdin, the event is triggered, no problem. But what I inputed is still treated as solid input and then appear on my console. My question is: is there a way to avoid this console input from being prompted to console, and just like libev to catch and store it?</p>
  
  <p>Any way in libev can do this?</p>
  
  <p>I paste the official example here:</p>
  
  <pre><code>    // a single header file is required
      #include &lt;ev.h&gt;
  
      #include &lt;stdio.h&gt; // for puts
  
      // every watcher type has its own typedef'd struct
      // with the name ev_TYPE
      ev_io stdin_watcher;
      ev_timer timeout_watcher;
  
      // all watcher callbacks have a similar signature
      // this callback is called when data is readable on stdin
      static void
      stdin_cb (EV_P_ ev_io *w, int revents)
      {
        puts ("stdin ready");
        // for one-shot events, one must manually stop the watcher
        // with its corresponding stop function.
        ev_io_stop (EV_A_ w);
  
        // this causes all nested ev_run's to stop iterating
        ev_break (EV_A_ EVBREAK_ALL);
      }
  
      // another callback, this time for a time-out
      static void
      timeout_cb (EV_P_ ev_timer *w, int revents)
      {
        puts ("timeout");
        // this causes the innermost ev_run to stop iterating
        ev_break (EV_A_ EVBREAK_ONE);
      }
  
      int
      main (void)
      {
        // use the default event loop unless you have special needs
        struct ev_loop *loop = EV_DEFAULT;
  
        // initialise an io watcher, then start it
        // this one will watch for stdin to become readable
        ev_io_init (&amp;stdin_watcher, stdin_cb, /*STDIN_FILENO*/ 0, EV_READ);
        ev_io_start (loop, &amp;stdin_watcher);
  
        // initialise a timer watcher, then start it
        // simple non-repeating 5.5 second timeout
        ev_timer_init (&amp;timeout_watcher, timeout_cb, 5.5, 0.);
        ev_timer_start (loop, &amp;timeout_watcher);
  
        // now wait for events to arrive
        ev_run (loop, 0);
  
        // break was called, so exit
        return 0;
      }
  </code></pre>