[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 16:22:30 +0200
* John Cowan <address@hidden> [120424 16:17]:
> I frankly see no point in this. Stdio streams are closed by calling
> exit(), and that's the appropriate time to kill them, when no further
> user-level code can be performed. What is more, they are *all* closed,
> not just the three standard ones.
> If a particular port type wants to take special action before the program
> exits, it should register a procedure with the OS using atexit(), which
> is available in both Posix and Win32. Such procedures are called by
> exit() just before streams are closed. Note that on_exit and _onexit
> are alternative, deprecated, names for this function.
Yes I am aware of these alternatives and will pursue in this direction.
Please ignore this patch.
Thanks for your thoughts,
9 out of 10 voices in my head say, that I am crazy,
one is humming.