chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] make csi close stdin/stderr/stdout when ex


From: Christian Kellermann
Subject: Re: [Chicken-hackers] [PATCH] make csi close stdin/stderr/stdout when exiting.
Date: Tue, 24 Apr 2012 13:13:21 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

* felix winkelmann <address@hidden> [120424 12:58]:
> > So maybe this is not the best way to deal with that. But what other
> > options are there? Can I explicitly call a finalizer?  Do we have a
> > way to insert an atexit handler that does not smash either the user's
> > or can restore the original chain (if at last my own handler
> > implements a chain, by calling the previous one) when the port is
> > explicitly closed by the user?
>
> You can always explicitly call a finalizer. Do you override the
> standard ports and need to perform some cleanup? You can use
> "on-exit".  It just pushes exit-handlers on a list, so by installing
> one you will not interfere with other exit-handlers, unless there is
> some implicit order to be taken care of, but this doesn't seem to be
> the case here.

Yes I am using a custom port for parley that should save its input
history. It currently is implemented in the port's close procedure.

Maybe an exit handler is better (probably in combination with
installing a finalizer and calling that finalizer in the exit
handler).

Thank you,

Christian

--
9 out of 10 voices in my head say, that I am crazy,
one is humming.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]