title: Sensible line buffer size in C?
body: <p>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 <code>&lt;limits.h&gt;</code> and use <code>LINE_MAX</code> for such things. It works fine on my Mac, but there's no <code>LINE_MAX</code> on Linux.</p>
  
  <p>This mailing list archive poses the same question, but no answer to my question
  <a href="http://bytes.com/topic/c/answers/843278-not-able-locate-line_max-limits-h" rel="nofollow noreferrer">http://bytes.com/topic/c/answers/843278-not-able-locate-line_max-limits-h</a></p>