Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site codas.ATT.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!mtuxo!mtune!akguc!codas!mikel From: mikel@codas.ATT.UUCP (Mikel Manitius) Newsgroups: net.unix,net.unix-wizards Subject: Re: Not a typewriter Message-ID: <573@codas.ATT.UUCP> Date: Fri, 20-Jun-86 13:21:01 EDT Article-I.D.: codas.573 Posted: Fri Jun 20 13:21:01 1986 Date-Received: Sat, 21-Jun-86 11:01:26 EDT References: <1683@homxb.UUCP> <542@codas.ATT.UUCP> <717@axis.UUCP> <564@codas.ATT.UUCP> <514@hropus.UUCP> Organization: AT&T Information Systems, Altamonte Springs, FL Lines: 20 Xref: watmath net.unix:8303 net.unix-wizards:18531 >> If a read or write is interrupted by a signal, it will return 0 or >> number of bytes written before the interrupt occured. In this case >> errno = 4, and no error code is returned from the system call. >> >> Mikel Manitius > >I suspect you are misreading the documentation. When a write system >call is interrupted, it may either return a short count or return -1. >Errno is set to 4 in the latter case. I don't know of any version of >UNIX in which read will return zero when interrupted. > > Kenneth Almquist Yes, you are correct. I don't always trust the documentation, so I rarely read it. I checked by writing a small C program, write does indeed return -1 not 0, when the call is interrupted and no bytes were read. -- Mikel Manitius @ AT&T-IS Altamonte Springs, FL ...{seismo!akgua|ihnp4|cbosgd}!codas!mikel.ATT.UUCP