This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Using the fd's underlying guile fports


| No. I want to borrow the fd from an already-open guile fport and give it
| to some third-party code which will use it. I implement two procedures,
| (pg:trace port) and (pg:untrace). After a scheme program calls pg:trace
| and before it calls pg:untrace, I want any access to the port to generate
| a scheme error. This requires a borrowed-the-fd count for each fport and
| the checking of this value before any of the ptobfuns are called.

Checking a value before calling ptobfuns wouldn't be enough, since
writing to a port doesn't necessary access any.  Maybe SCM_PTAB_ENTRY
could check it, but is it worth it?  I'm curious about what would
actually happen when somebody used the port in Scheme that would be so
bad.  I guess they'd get confusing trace output (which they would be
basically asking for), or could something worse happen?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]