Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!vtc.tacom.army.mil!ulowell.uml.edu!europa.chnt.gtegsc.com!howland.reston.ans.net!news.sprintlink.net!in1.uu.net!vixie!nnrp!vixie From: vixie@wisdom.home.vix.com (Paul A Vixie) Newsgroups: comp.unix.programmer,comp.unix.bsd.bsdi.misc Subject: Re: open() regular file nonblocking Date: 20 Aug 1995 05:40:36 GMT Organization: Vixie Enterprises Lines: 12 Message-ID: <VIXIE.95Aug19224036@wisdom.home.vix.com> References: <4146ju$fup@nnrp3.primenet.com> NNTP-Posting-Host: wisdom.home.vix.com In-reply-to: jdw@primenet.com's message of 19 Aug 1995 08:15:58 GMT Xref: euryale.cc.adfa.oz.au comp.unix.programmer:27936 comp.unix.bsd.bsdi.misc:648 O_NONBLOCK is not helpful to open() of disk files since the assumption inside open() is that all delays will be due to relatively local phenomena. O_NONBLOCK will return early on open() of tty devices which would otherwise block for DCD. O_NONBLOCK applied with fcntl() will make connect() return early instead of waiting for the TCP three-way-handshake. For disk files, the system "knows" that nothing can "block" it -- delays due to hardware slowness are different entirely from delays due to external events like TCP handshakes and DCD pins. -- Paul Vixie La Honda, CA "Illegitimi non carborundum." <paul@vix.com> pacbell!vixie!paul (dont let the bastards grind you down)