[so] primul test 'sig_closed'
Silviu-Ionut Ganceanu
silviug at gmail.com
Sun Jan 6 18:58:06 EET 2008
Intr-o abordare de genu:
void *vinit(size_t virt_pages, size_t phys_pages) {
....
sigaction(SIGSEGV, &action, &default_action);
....
}
int vend(void) {
....
sigaction(SIGSEGV, &default_action;
....
}
pic primul test 'sig_closed'.
Daca in schimb, schimb "vinit" sa fie ceva de genu (am inrosit schimbarile):
void *vinit(size_t virt_pages, size_t phys_pages) {
....
memset(&default_action, 0, sizeof(struct sigaction));
default_action.sa_handler = SIG_DFL;
sigemptyset(&default_action.sa_mask);
sigaction(SIGSEGV, &action, NULL);
....
}
trece.
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.
Silviu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/so/attachments/20080106/64d0a420/attachment.html
More information about the so
mailing list