Community
Participate
Working Groups
Build Identifier: Build id: M20100909-0800 Eclipse hang when i hit control d on the console. my code is a simple shell written in c when i type something the shell prints it back what i typed. to end it i must pass EOF to the program with control D on eclipse console when I hit control D it hangs every time please fix this. Reproducible: Always Steps to Reproduce: 1. run my program 2. go to console cdt and type Control D 3.
My code is simple. #include <stdio.h> int main(){ char c = 'a'; while(c != EOF){ c = getchar(); } }