Intr-o abordare de genu:<br><br>void *vinit(size_t virt_pages, size_t phys_pages) {<br>....<br> sigaction(SIGSEGV, &action, &default_action);<br>....<br>}<br><br>int vend(void) {<br>....<br> sigaction(SIGSEGV, &default_action;
<br>....<br>}<br>pic primul test 'sig_closed'.<br><br>Daca in schimb, schimb "vinit" sa fie ceva de genu (am inrosit schimbarile):<br><br>void *vinit(size_t virt_pages, size_t phys_pages) {<br>
....<br><span style="color: rgb(255, 0, 0);"> memset(&default_action, 0, sizeof(struct sigaction));</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);"> default_action.sa_handler = SIG_DFL;
</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);"> sigemptyset(&default_action.sa_mask);</span><br style="color: rgb(255, 0, 0);"><br>
sigaction(SIGSEGV, &action, <span style="color: rgb(255, 0, 0);">NULL</span>);<br>
....<br>
}<br>
<br>trece.<br><br>Sa presupun ca e problema in teste? Este un detaliu minor, dar cred ca inainte de orice vinit ar trebui setat handler-ul de semnal pe care testul 'sig_closed' il asteapta.<br><br>Silviu<br><br>