...省略... #define BUFLEN 10 int main(int argc, char **argv) { ...省略... if ((rtn = fgets(buf,10,stdin)) == NULL) { exit(-1); }