[...]
> As previously reported to the glibc folks, glibc allows a write to
> a closed file descriptor.
Closed file _descriptor_, as in 1, or _stream_, as in stdout? If the
former, glibc just passes the write(2) along to the kernel, and has nothing
more to do with it. If the later, you can blame glibc.
Note that if you do something like:
FILE *f = fopen("foo", "w");
int d = fileno(f);
close(d); fprintf(f, "bar");
you _will_ get what you deserve. glibc has no easy way of knowing what you
are doing behind it's back, and _that_ much paranoia isn't useful anyway.
-- Dr. Horst H. von Brand mailto:vonbrand@inf.utfsm.cl Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html