[fpc-pascal] Stopping daemon in linux
Jonas Maebe
jonas.maebe at elis.ugent.be
Mon Nov 9 12:05:37 CET 2009
On 09 Nov 2009, at 09:07, Michael Van Canneyt wrote:
> It should stop the daemons properly. This is the code that gets
> executed:
>
> Procedure DoShutDown(Sig : Longint; Info : PSigInfo; Context :
> PSigContext);
> cdecl;
>
> begin
> Application.StopDaemons(True);
> Application.Terminate;
> end;
>
> If it doesn't, something is wrong :(
Are both of these routines and all code they call safe for
asynchronous execution? (i.e., can they be safely called when the
program was in the middle of a getmem, I/O operation, ...) Usually the
most you should ever do inside a signal handler is set some global
variable, because you have no idea what code is currently actually
executing.
Jonas
More information about the fpc-pascal
mailing list