i have a console application from which i have created two cmd.exe process's. i want to capture the SIGINT signal in the console app and in the callback fuction of SIGINT i want to close the two processes created. but the processes are not terminated.
the call back of the SIGINT looks like this:
void cleanup(int data){
DWORD lpExitCode; GetExitCodeProcess(processInfoMain.hProcess,&lpExitCode); if(!TerminateProcess(processInfoMain.hProcess,lpExitCode)) { printf("\n unable to terminateprocess"); } GetExitCodeProcess(processInfoRil.hProcess,&lpExitCode); if(!TerminateProcess(processInfoRil.hProcess,lpExitCode)) { printf("\n unable to terminateprocess"); }
}
could any one please help me how to terminate the two processes created.
Do NOT use T<code>erminateProcess.
T<code>erminateProcess
See the 'Remarks' section here [^]
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)