Re: protecting malloc(), etc

Date view Thread view Subject view Author view

From: Godmar Back (gback@cs.utah.edu)
Date: Sat Feb 06 1999 - 23:12:18 EST


>
> On Feb 7, 1999, Godmar Back <gback@cs.utah.edu> wrote:
>
> >>
> >> On Feb 5, 1999, Godmar Back <gback@cs.utah.edu> wrote:
>
> >> > Unfortunately, libltdl uses stdio, although it didn't look like that
> >> > would be hard to fix.
>
> >> Where does it?
>
> > in ltdl.c, search for fopen, feof, and fclose.
>
> Jeez, I must be sleeping. When I read stdio, I understood `open,
> read, close, etc', which it doesn't use directly. Using stdio instead
> of direct I/O functions is better, IMO, because it takes care of
> restarting in case of signals, AFAIK.
>

No function in stdio is async-signal-safe.
Using stdio instead of directly using the system calls means that the
use of libltdl in situations like the one we have in kaffe puts a special
burden on the user. True, you have to handle EINTR yourself---put it'll
make libltdl more robust. You'll have to implement or steal a fgets.

        - Godmar


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:59 EDT