[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IOTA losing?



    Date: 15 February 1980 07:16-EST
    From: Kent M. Pitman <KMP at MIT-MC>
    (DEFUN SMART-PROBEF (FILE) 
	   (AND (ERRSET (IOTA ((STREAM FILE '(IN NODEFAULT))) T) NIL) T))
    when used with a non-existent file -- eg,
    (SMART-PROBEF '((DSK FOO) BAR BAZ))
    -- returns NIL but leaves interrupts turned off(?) ... doing
    <Control-G> T<space> (NOINTERRUPT T) (NOINTERRUPT NIL)
    should illustrate the state of the world after this has been done.
Weird code is being produced by IOTA - A simplified version of the problem 
may be seen as follows:
 (DEFUN KMP-LOSES () (ERRSET (UNWIND-PROTECT NIL (OPEN '((DSK BOO) BAR BZ)))))
The "OPEN" is being done as part of the "clean-up" code, and that is where
the "error" occurs;  ERRSET doesn't bind/restore the "UNREAL" variable,
so that is why it is left off.  Although this is implementationally a bug in
ERRSET, it probably isn't worth fixing now;  I'd suggest heartily that you 
don't have error-producing code in the "clean-up" part of an UNWIND-PROTECT.  
(Yes, it would break a lot of code to try to "fix" ERRSET- since another slot 
on its stackframe would be needed).