Date: Sat, 20 Sep 1997 04:30:01 -0700 (PDT) From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-bugs Subject: Re: bin/4585: termcap search fails too early Message-ID: <199709201130.EAA00831@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/4585; it has been noted by GNATS.
From: j@uriah.heep.sax.de (J Wunsch)
To: arnej@math.ntnu.no
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/4585: termcap search fails too early
Date: Sat, 20 Sep 1997 13:19:43 +0200
As arnej@math.ntnu.no wrote:
> Patch from NetBSD:
>
> Index: src/lib/libc/gen/getcap.c
> ===================================================================
> RCS file: /usr/cvs/src/lib/libc/gen/getcap.c,v
> retrieving revision 1.4
> diff -u -r1.4 getcap.c
> --- getcap.c 1995/10/22 14:36:15 1.4
> +++ getcap.c 1997/09/19 21:26:27
> @@ -269,10 +269,7 @@
> fd = open(*db_p, O_RDONLY, 0);
> if (fd < 0) {
> /* No error on unfound file. */
> - if (errno == ENOENT)
> - continue;
> - free(record);
> - return (-2);
> + continue;
> }
> myfd = 1;
> }
Why would it be wrong to make it continue only in the ENOENT and
EACCES? Maybe ELOOP, too. Something like EMFILE or ENFILE should for
sure be treated as an error in the first place.
--
cheers, J"org
joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709201130.EAA00831>
