How to use common variable!! Urgent

Hi All,
int EXIT_CODE =1;
int main(int agrs, char* agrv[])
{

if( agrv == "start" )
{

while (EXIT_CODE) { }
}
else if (argv[1] == "stop"
{
EXIT_CODE =0;
}
}

this is my code, One instance of the code is running in one window, ./myexe start.

i want to stop the program from another window by giving ./mysex stop.

Can anyone help in this. One instance should start execution and one should stop the execution.

Hw to achive this ?

Topic archived. No new replies allowed.