diff -r f345bda72bc4 -r 43e37759235e Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/raise_signal_8c-source.html --- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/raise_signal_8c-source.html Tue Mar 30 11:56:28 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ - -
-00001 // raiseSignal.c -00002 // -00003 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -00004 // All rights reserved. -00005 // This component and the accompanying materials are made available -00006 // under the terms of "Eclipse Public License v1.0" -00007 // which accompanies this distribution, and is available -00008 // at the URL "http://www.eclipse.org/legal/epl-v10.html". -00009 // -00010 // Initial Contributors: -00011 // Nokia Corporation - initial contribution. -00012 // -00013 // Contributors: -00014 // -00015 // Description: raiseSignal.c source file -00016 // -00017 -00018 #include <stdio.h> -00019 #include <stdlib.h> -00020 #include <signal.h> -00021 #include <unistd.h> -00022 -00027 void PressKey() -00028 { -00029 int ch; -00030 printf("Press 'e'+Enter to exit\n"); -00031 while((ch = getchar()) != 'e') -00032 { -00033 if(ch == '\n') -00034 continue; -00035 else -00036 printf("wrong option inserted, try again!!!\n"); -00037 } -00038 } -00039 -00044 int main(int argc,char **argv) -00045 { -00046 pid_t id = atoi(argv[1]); -00047 int arg = argc; -00048 int ret; -00049 printf("*********************In the raiseSignal***********************\n"); -00050 printf("\nThis process sends a SIGTERM signal to the sigtermSignal process.\n"); -00051 printf("\nPress Enter to send the SIGTERM signal\n"); -00052 getchar(); -00053 -00054 //Raising SIGTERM signl using kill command. -00055 ret = kill(id, SIGTERM); -00056 if(ret) -00057 { -00058 printf("Kill() failed, errno=%d", errno); -00059 } -00060 PressKey(); -00061 return EXIT_SUCCESS; -00062 } -