c++ limit process child ignore SIGXCPU
<p>I have this code </p>

<pre><code>static void sigXCPU(int pTmp){
  cout&lt;&lt;" .... ";
}

.....
pid_t vPid=fork(); 
  int vStat;   

  switch(vPid){
  case -1: perror("fork");
    exit(1);
  case 0:
    //limit on data
    struct rlimit vLimD;
    vLimD.rlim_cur = 100000; 
    vLimD.rlim_max =  1000000; 
    setrlimit(RLIMIT_DATA, &amp;vLimD);
    //limit on cpu time
    struct rlimit vLimCPU;
    vLimCPU.rlim_cur = 1;
    vLimCPU.rlim_max = 1;

    execl("./p1","",NULL);    
    if(signal(SIGXCPU,sigXCPU)==SIG_ERR);
    break;
  default: 
    while(wait(&amp;vStat)!=vPid);
    break;}
</code></pre>

<p>and the code for p1 is </p>

<pre><code>int main(){
  sleep(10);
return 0;}
</code></pre>

<p>Why does the child ignore SIGXCPU?The code are compiled with  gcc under FreeBsd 8.0 amd64.</p>
