Path: utzoo!attcan!uunet!mcsun!ukc!edcastle!aiai!richard From: richard@aiai.ed.ac.uk (Richard Tobin) Newsgroups: comp.unix.internals Subject: Re: Trojan Horses Message-ID: <3585@skye.ed.ac.uk> Date: 19 Oct 90 13:16:47 GMT References: <1990Oct7.155203.13283@hq.demos.su> <18578@rpp386.cactus.org> <3173@unisoft.UUCP> Reply-To: richard@aiai.UUCP (Richard Tobin) Organization: AIAI, University of Edinburgh, Scotland Lines: 16 In article bzs@world.std.com (Barry Shein) writes: >>I wonder, incidentally, why does close() return something? >Trying to close a closed file descriptor will cause -1 to be returned >and errno set to EBADF. Close can also be interrupted (EINTR), And with at least one network file system, errors such as "disk full" may not be reported until the file is closed, due to client buffering. Failure to check for this leads to editors truncating files and other such unpleasantness. -- Richard -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin