SIGTERM work but the default action is quiet brutal, equivalent of halt. Look for fpSigAction in the FPC documentation to learn how to call your own function to handle this signal and cleanly close your application.