title: C++ get linux distribution name\version
body: <p>According to the question " <a href="https://stackoverflow.com/questions/1320401/how-to-get-linux-distribution-name-and-version">How to get Linux distribution name and version?</a> ", to get the linux distro name and version, this works:</p>
  
  <pre><code>lsb_release -a
  </code></pre>
  
  <p>On my system, it shows the needed output:</p>
  
  <pre><code>No LSB modules are available.
  Distributor ID: Ubuntu
  Description:    Ubuntu 9.10
  Release:    9.10
  Codename:   karmic
  </code></pre>
  
  <p>Now, to get this info in C++, Qt4's QProcess would be a great option but since I am developing without Qt using std c++, I need to know how to get this info in standard C++, i.e. the stdout of the process, and also a way to parse the info.</p>
  
  <p>Uptil now I am trying to use code from <a href="https://stackoverflow.com/questions/4127567/linux-c-run-and-communicate-with-new-process/4127696#4127696">here</a> but am stuck on function <a href="http://linux.die.net/man/2/read" rel="noreferrer">read</a>().</p>