How to use dprintf()
<p>I've been told that the function <a href="https://linux.die.net/man/3/dprintf" rel="noreferrer">dprintf()</a> can be useful in writing data to pipes. Problem is, I can't find any examples that explain how to use it. I've read everything in that link, but still don't quite understand it.</p>

<p>Just a very simple example will help me understand a lot. For instance, if I had a pipe:</p>

<pre><code>int fd[2];
pipe(fd);
</code></pre>

<p>and a few pids</p>

<pre><code>pid_t ID1, ID2, ID3;
</code></pre>

<p>how could I use dprintf() to write those pids to the pipe?</p>