pid_t pid=fork();
printf("%d\n",pid);
if(pid==0){
sleep(3);
printf("!");
}
else
{
printf("@");
read_routine(clnt_sock,buf);
}
On my console, I can see two pid and !
, but there is no @
.
And when I delete the statement read_routine(clnt_sock,buf);
, then I can see @
on console.
In read_routine
function, there is just some input statement using fgets()
.
Are there some secrets of printf
?