title: signal error: "invalid use of void expression"
body: <p>I have some other trouble using the "signal" function. I have 5 children processes and its father.</p>
  
  <p>Only one process should be running at a time, and that process should change to another aleatory process with some delay (from 1 to 10 seconds). For those changes its mandatory to use SIGUSER1 signal. This is my code and the error I'm having:</p>
  
  <pre><code>struct compartido{
     int pid1, pid2, pid3, pid4, pid5;
     int propietario;     
     int contador;            
     int pidpadre;            
  };
  
     struct compartido* var;  
  
  void manejador(int prop, int actual){
     if(signal(SIGUSR1,SIG_IGN)==SIG_ERR){
        perror("Error en el Signal.\n");
        exit(2);
     }
     printf("Proceso %d al mando en el manejador.\n",prop);
  
     kill(prop,SIGCONT);
     if(actual==getpid()) kill(actual,SIGSTOP);
  
     sleep(rand() % 11 + 1);
  }
  
  int main(int argc, char *argv[]) {
  
      key_t llave1,llavesem;  
      int idmem,idsem;    
  
  
      idmem=shmget(llave1,sizeof(struct compartido),IPC_CREAT|0600);
      if (idmem==-1) {
          perror ("shmget");
          return 1;
      }
      var=(struct compartido*) shmat(idmem,0,0);
      var-&gt;pidpadre=getpid();
  
      var-&gt;propietario=var-&gt;pid1;
      /*Next line gives the error*/
      if(var-&gt;pid1==getpid()) signal(SIGUSR1,manejador(var-&gt;propietario, getpid()));
  
      /*Doing more things inside...*/
  
      /*Next line gives the error*/
     signal(SIGUSR1,manejador(var-&gt;propietario, getpid()));
  }
  </code></pre>
  
  <p>As far as I know, the function called "manejador" could be used with one int value
      void manejador(int s){
           printf("Signal received %d\n",s);
      }</p>
  
  <p>But I need 2 variables inside, because I should stop the current process and relaunch the new one.</p>
  
  <p>The exact error I'm having says:</p>
  
  <blockquote>
    <p>error: invalid use of void expression</p>
  </blockquote>
  
  <p>Can you please, help me?</p>