title: Execute Linux shell command in c++ while hiding its output
body: <p>I want to execute a Linux shell command from "/sbin/" with execl or system (or another command), and hide its output.</p>
  
  <p>I am using "fork" already to get a child process...</p>
  
  <p>Like if I entered...</p>
  
  <pre><code>service "servicename" restart
  </code></pre>
  
  <p>I would see the output where it says "restarting xyz [OK]". Instead, I simply want the command to be executed silently and its output discarded instead of being shown in my console application.</p>