On 01/14/2014 11:26 AM, Mark Morgan Lloyd wrote:

Does it exit in a sufficiently-controlled state

Yep. If nothing completely unexpected happens, it writes a message in a log file and cleanly exits. Of course there _might_ be memory leaks, an unexpected kill signal or other queer stuff that could kill the application.

that you could simply exec a new copy at the end of the finalization block?

Using SysUtils.ExecuteProcess ? Do you think that this will work cleanly, even though the dying process would be the parent of the new one ? AFAIR, Linux performs a "reparent" at this point and assign the grand-parent. So it really might work.



Is the finalization block executed even when a "nasty" exception like "kill signal", "nonexisting address", or "division by zero" happens ?

The available parameters should be accessible in /proc.

Yep. In fact I would need a parameter that activates this feature, so that the program also can be run normally. No problem here.


-Michael


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to