lkml.org 
[lkml]   [2002]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectmmap, SIGBUS, and handling it
Hi

One change in kernel 2.4.x is to send a SIGBUS signal to the process
trying to read a mmap section that is invalid.

Ex, if we have a file server, and that program gets a request for a file,
it does a mmap. After that starts serving the file to the client (by
write()-ing to the socket fd). If in the meantime some other process
truncates the file which was mmap-ed , our program will receive a SIGBUS
in write().

If I understand right this is more POSIX compliant.

Is there a clean/good way of handling this ?

PS: why signal(SIGBUS,SIG_IGN) doesnt work, but a user handler its called
if set with signal(SIGBUS,handle_sigbus) ?

Thanks

----------------------------
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/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.069 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site