diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-186B9876-2A08-5F23-BB49-49EC34C51507.dita --- a/Symbian3/PDK/Source/GUID-186B9876-2A08-5F23-BB49-49EC34C51507.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-186B9876-2A08-5F23-BB49-49EC34C51507.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,51 +1,51 @@ - - - - - -Using -Signals to Terminate Processes -

A P.I.P.S. process can terminate another P.I.P.S process by sending a SIGKILL or -a SIGTERM signal to it using kill() or sigqueue().

-

SIGKILL terminates a process without any notification. -Typically it used by a parent process to manage its children, or by a system -utility to terminate other applications.

-

Note: Your process must have the PowerMangement capability -to send a SIGKILL signal to another process.

-

SIGTERM is a request for termination. The receiving -process can choose to shutdown gracefully or ignore the request. The following -example code demonstrates how you can handle a SIGTERM signal -and shutdown a process:

-#include <signal.h> -#include <stdio.h> -#include <stdlib.h> -void sighandler(int signum) - { - if(signum == SIGTERM) - { - // Perform clean up - exit(-1); - } - else - printf(“Error: Unknown signal”); - } -int main() - { - signal(SIGTERM,sighandler); // When SIGTERM arrives, invoke sighandler() - // program logic - return 0; - } -
-Signal Emulation -on the Symbian Platform -Using Signals -to Handle Exceptions -Using Signals -to Handle Asynchronous Events + + + + + +Using +Signals to Terminate Processes +

A P.I.P.S. process can terminate another P.I.P.S process by sending a SIGKILL or +a SIGTERM signal to it using kill() or sigqueue().

+

SIGKILL terminates a process without any notification. +Typically it used by a parent process to manage its children, or by a system +utility to terminate other applications.

+

Note: Your process must have the PowerMangement capability +to send a SIGKILL signal to another process.

+

SIGTERM is a request for termination. The receiving +process can choose to shutdown gracefully or ignore the request. The following +example code demonstrates how you can handle a SIGTERM signal +and shutdown a process:

+#include <signal.h> +#include <stdio.h> +#include <stdlib.h> +void sighandler(int signum) + { + if(signum == SIGTERM) + { + // Perform clean up + exit(-1); + } + else + printf(“Error: Unknown signal”); + } +int main() + { + signal(SIGTERM,sighandler); // When SIGTERM arrives, invoke sighandler() + // program logic + return 0; + } +
+Signal Emulation +on the Symbian Platform +Using Signals +to Handle Exceptions +Using Signals +to Handle Asynchronous Events
\ No newline at end of file