Re: mmap, SIGBUS, and handling it

Mihai RUSU (dizzy@roedu.net)
Fri, 10 May 2002 19:04:36 +0300 (EEST)


On Fri, 10 May 2002, David S. Miller wrote:

> From: Mihai RUSU <dizzy@roedu.net>
> Date: Fri, 10 May 2002 18:37:21 +0300 (EEST)
>
> PS: why signal(SIGBUS,SIG_IGN) doesnt work, but a user handler its called
> if set with signal(SIGBUS,handle_sigbus) ?
>
> How would you like the kernel to "ignore" a page fault that cannot be
> serviced?
>

You are right, its not that I want to ignore it. The problem was that I
want to handle it some way but I dont know how. If I will make a user
handler for it how can I know if its a SIGBUS from a HW error or a SIGBUS
from that write()-case. Because I have to continue serving files even
after received a SIGBUS in that write (otherwise my file server will exit
with SIGBUS and thats no good :) ).

Take for example any single process ftp/http server, they are hit by this
problem. Which solution would you recommend ? :)

----------------------------
Mihai RUSU

Disclaimer: Any views or opinions presented within this e-mail are solely
those of the author and do not necessarily represent those of any company,
unless otherwise specifically stated.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/