[PATCH] libc_r bug: successful close(2) sets errno to ENOTTY

boyd, rounin boyd at insultant.net
Mon Nov 24 10:06:51 PST 2003

From: "Jacques A. Vidrine" <nectar at FreeBSD.org>
> The application is broken.  You must only check errno if you get an
> error indication from the library call.

errno is only meaningful after a syscall error.

it is also well known that stdio uses isatty(3) (or equivelant) that may
set errno to ENOTTY.

More information about the freebsd-current mailing list