Thanks.
It's printing the pids as following :
pid: 1355
pid: 0
pid: 0
On the father, it's already reading two lines from the the exec output :
With this printf I'm already obtaining two lines.Code:printf("<<<<%s\n",buffer);
The exec output has around 15 lines though, any idea why it's not printing the rest ?