[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] make csi close stdin/stderr/stdout when ex
Re: [Chicken-hackers] [PATCH] make csi close stdin/stderr/stdout when exiting.
Tue, 24 Apr 2012 13:13:21 +0200
* 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
9 out of 10 voices in my head say, that I am crazy,
one is humming.