From 3b754cef19e4fc5b4a2577c06214782cb0161dd2 Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Sun, 16 Jun 2019 00:24:23 +0300 Subject: [PATCH] fixed file closing on program termination --- src/posix/generic/Host/Mod/Lang.cp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/posix/generic/Host/Mod/Lang.cp b/src/posix/generic/Host/Mod/Lang.cp index 836888e..00a7935 100644 --- a/src/posix/generic/Host/Mod/Lang.cp +++ b/src/posix/generic/Host/Mod/Lang.cp @@ -153,15 +153,12 @@ MODULE HostLang; encoding := enc$ END Init; - PROCEDURE Fin; - VAR res: iconv.int; - BEGIN - res := iconv.iconv_close(sc2c); sc2c := invalid; - res := iconv.iconv_close(c2sc); c2sc := invalid - END Fin; + (** + Do not close iconv descriptors! + It can lead to quiet traps on program termination and bugs like + not removed temp files. + **) BEGIN Init -CLOSE - Fin END HostLang. -- 2.29.2