[Top][All Lists]
[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: |
Felix |
Subject: |
Re: [Chicken-hackers] [PATCH] make csi close stdin/stderr/stdout when exiting. |
Date: |
Tue, 24 Apr 2012 12:56:47 +0200 (CEST) |
> 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.
cheers,
felix