1

not blocking in scanf() after making a process active?

view story
linux-howto

http://stackoverflow.com – I am having a parent process 'A' and a child process 'B'. Child process act like a console process, and which is implemented like this .. #include<iostream> #include<cstdio> int main() { char inputCommand[50]; while(1) { cout<<"CONSOLE>"; cout.flush(); strcpy(inputCommand,""); __fpurge(stdin); scanf(" %s",inputCommand); return 0; // here I have an array of commands // next i am comparing the input command with the array and getting a number (HowTos)