is there any way to check asynchronously whether stdin contain data to read?

Discussion in 'C Programming' started by Voronkov Konstantin, Oct 1, 2004.

  1. Hello All!

    I want to ask you whether there is any way to check asynchronously
    whether stdin contain data to read. I tried all operations to read
    stdin, but it looks all that operations are blocking.

    Thanks in advance,
    Voronkov Konstantin
    Voronkov Konstantin, Oct 1, 2004
    #1
    1. Advertising

  2. Voronkov Konstantin

    Alex Fraser Guest

    "Voronkov Konstantin" <> wrote in message
    news:...
    > I want to ask you whether there is any way to check asynchronously
    > whether stdin contain data to read. I tried all operations to read
    > stdin, but it looks all that operations are blocking.


    Yes, all standard C library I/O operations are blocking. Normally there is
    some OS-specific way to do what you ask, but you should ask about that on
    group(s) dedicated to the system(s) of interest.

    HTH,
    Alex
    Alex Fraser, Oct 1, 2004
    #2
    1. Advertising

  3. Voronkov Konstantin

    Richard Bos Guest

    (Voronkov Konstantin) wrote:

    > I want to ask you whether there is any way to check asynchronously
    > whether stdin contain data to read. I tried all operations to read
    > stdin, but it looks all that operations are blocking.


    <http://www.eskimo.com/~scs/C-faq/q19.2.html>

    Richard
    Richard Bos, Oct 1, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Voronkov Konstantin
    Replies:
    1
    Views:
    338
    John Harrison
    Oct 1, 2004
  2. Charlie Zender

    Reading stdin once confuses second stdin read

    Charlie Zender, Jun 19, 2004, in forum: C Programming
    Replies:
    6
    Views:
    770
    Dan Pop
    Jun 21, 2004
  3. Voronkov Konstantin
    Replies:
    3
    Views:
    313
    Richard Bos
    Oct 4, 2004
  4. Roger Pack
    Replies:
    3
    Views:
    148
    Roger Pack
    Sep 28, 2010
  5. Ramon F Herrera
    Replies:
    1
    Views:
    77
    Thomas 'PointedEars' Lahn
    May 13, 2009
Loading...

Share This Page