title: In C++, how to get the path to a service in Linux?
body: <p>Given the name of a <code>service</code> or <code>daemon</code>, is there some way by which I can get the location of that service from a <code>C++</code> program in <code>Linux</code>?
  I hope, one way is to search the <code>proc filesystem</code> using it <code>pid</code>. Does there exist some <code>Linux</code> functions for this?</p>
  
  <p>Thank You</p>
  
  <p>edit: To be more specific I am working on Linux equivalent code for <a href="https://stackoverflow.com/questions/27800532/getting-service-path-to-executable">this</a> program in Windows.</p>