Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Aug 1998 03:02:15 +0000
From:      Mike Smith <mike@smith.net.au>
To:        "System Administrator" <igor@ns.online.samara.ru>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: read timeout 
Message-ID:  <199808210302.DAA06039@dingo.cdrom.com>
In-Reply-To: Your message of "Fri, 21 Aug 1998 14:17:46 GMT." <AAA6OtrODQ@ns.online.samara.ru> 

next in thread | previous in thread | raw e-mail | index | archive | help
> i read from tty:
>         fd = open(/dev/cuaa0, O_RDWR)
>         n = read(fd, &c, 1)
> may I set timeout in which read wait data ?
> if no data read must return 0

Go to www.amazon.com, or some other suitable bookstore, and purchase a
copy of "Advanced Programming in the Unix Environment" by W. Richard
Stevens.  It will answer not only the above question, but many others 
that you will have.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808210302.DAA06039>