Facing issue with fgets in while loop
I have a program like below
i want to call a server program using the command line argument passed to this popen().
#define LEN 4048
if i pass the cmd as -s(server), it fetches the server data and storing that in dest buffer.
i want to print the data received in "dest" outside the loop(while loop never exit for server)
Please help to print the data out of the while loop.