I'm using popen to read output from shell commands. I will use fgets to read line by line.
My question is how to choose the best buffer size for my char* buffer? I remember from a professor telling us to include <limits.h>
and use LINE_MAX
for such things. It works fine on my Mac, but there's no LINE_MAX
on Linux.
This mailing list archive poses the same question, but no answer to my question http://bytes.com/topic/c/answers/843278-not-able-locate-line_max-limits-h