<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">Am Di., 22. Jan. 2019, 10:55 hat Alexander via fpc-devel <<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>> geschrieben:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I try use finalization in unit, but it not work.<br>
<br>
When press Ctrl+C and exit program uses this unit<br>
PC-Speaker stay infinity play on interrupted tone.<br>
When Ctrl+C use spkoff; in finalization section not called.</blockquote></div></div><div dir="auto"><br></div><div dir="auto">You need to explicitly handle the SIGINT signal so that your program can terminate gracefully. The default behavior is to simply kill the program which means that the finalization sections won't run. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"></div></div>