lkml.org 
[lkml]   [1998]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Out of ptys
Date
From
"Richard B. Johnson" <root@chaos.analogic.com> said:

[...]

> 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

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.068 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site