diff --git a/lisp/c/printer.c b/lisp/c/printer.c index 643e2935a..b0aa3049f 100644 --- a/lisp/c/printer.c +++ b/lisp/c/printer.c @@ -550,7 +550,7 @@ register context *ctx; register pointer x; register pointer f; register int prlevel; -{ register pointer fobj; +{ register pointer fobj,tmp; register int shareix=0; numunion nu; @@ -586,6 +586,13 @@ register int prlevel; else if (Spevalof(PROBJECT)!=NIL) prinxobj(ctx,x,f,fobj,prlevel-1); else if (pisarray(x) && (classof(x)==C_ARRAY)) printarray(ctx,x,f,prlevel-1); else if (Spevalof(PRSTRUCTURE)!=NIL) printstructure(ctx,x,f,fobj,prlevel-1); + else if (Spevalof(PRCIRCLE)!=NIL) { + // force NIL to avoid deadlocks (EusLisp/#465) + // TODO: consider :prin1 objects in the initial printmark + tmp=Spevalof(PRCIRCLE); + pointer_update(Spevalof(PRCIRCLE),NIL); + csend(ctx,x,K_PRIN1,1,f); + pointer_update(Spevalof(PRCIRCLE),tmp)} else csend(ctx,x,K_PRIN1,1,f); } }