> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: 26 April 2000 14:52
> To: [EMAIL PROTECTED]
> Subject: LWP test triggers CRTL bug
>
[snip]
>
> I can see how to do it, but it's really painful....in my_fwrite:
>
> if (fstat(fileno(dest),&s) == 0 && S_ISSOCK(s.st_mode)) {
> write(fileno(dest),src,nitm*itmsz);
> } else {
> ...the code currently in my_fwrite...
> }
>
> This works, but that damn "fstat" has to be done for *every* *single*
> print...that's a performance hit we don't really need. (my_fwrite
> doesn't know when the FILE * has been closed and reopened,
> and yes they
> do get reused).
Just a thought (I don't know the code): could one perhaps hack the FILE open
code instead to do the necessary checks, storing the result in a variable
associated with the FILE? Then my_fwrite() code could just check the
variable. [And perhaps clear the variable where the FILE is closed.]
That should reduce the overhead, but might be tricky to implement?
[snip]
--
Sebastian Bazley <[EMAIL PROTECTED]>
The opinions expressed herein are my own, and are not necessarily endorsed
by my employer ...
___________________________________________________________________________
This email is confidential and intended solely for the use of the
individual to whom it is addressed. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
Sema Group.
If you are not the intended recipient, be advised that you have received this
email in error and that any use, dissemination, forwarding, printing, or
copying of this email is strictly prohibited.
If you have received this email in error please notify the Sema Group
Helpdesk by telephone on +44 (0) 121 627 5600.
___________________________________________________________________________