title: How to use sigwaitinfo() in C
body: <p>I'm trying to make the process to wait for a signal from his son. It seems to not be working. I'm not into C this much so my code can be horrible. Here's the code:</p>
  
  <p>Parents code: </p>
  
  <pre><code>sigemptyset (&amp;mask);
  sigaddset (&amp;mask, SIGUSR1);
  sigprocmask (SIG_SETMASK, &amp;mask, NULL); 
  sigwaitinfo(&amp;mask, &amp;info);
  sigprocmask (SIG_UNBLOCK, &amp;mask, NULL);
  </code></pre>
  
  <p>Children code:</p>
  
  <pre><code>kill(getppid(), SIGUSR1);
  </code></pre>