mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* mmap, SIGBUS, and handling it
@ 2002-05-10 15:37 Mihai RUSU
  2002-05-10 15:30 ` David S. Miller
  2002-05-10 16:27 ` Alan Cox
  0 siblings, 2 replies; 13+ messages in thread
From: Mihai RUSU @ 2002-05-10 15:37 UTC (permalink / raw)
  To: linux-kernel

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.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2002-05-11 13:27 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-10 15:37 mmap, SIGBUS, and handling it Mihai RUSU
2002-05-10 15:30 ` David S. Miller
2002-05-10 15:53   ` Maciej W. Rozycki
2002-05-10 15:47     ` David S. Miller
2002-05-10 17:03       ` Maciej W. Rozycki
2002-05-10 16:56         ` David S. Miller
2002-05-10 19:54           ` Maciej W. Rozycki
2002-05-10 15:56   ` Dave Gilbert (Home)
2002-05-10 15:48     ` David S. Miller
2002-05-10 16:04   ` Mihai RUSU
2002-05-11 13:27     ` Alex Riesen
2002-05-10 16:27 ` Alan Cox
2002-05-10 16:40   ` Mihai RUSU

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®