[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Signals, messages and exceptions

From: Igor Khavkine
Subject: Signals, messages and exceptions
Date: Sat, 7 Jul 2001 14:42:48 -0400
User-agent: Mutt/1.3.18i

I've been looking through the glibc code that handles signals
for Hurd. At the same time I'm writing up a some docs on that
so someone else won't have to do it again.

What I'm surprised by is that signals are passed between processes
using simple RPC messages. Mach has an exception facility
for threads and tasks, so I thought that exceptions would be
mapped to signals and vice versa. If a thread receives an exception,
it is mapped to a signal. But this seems really strange, why
have two ways of getting signals? It just duplicates the amount
of code that needs to handle them.

Both ways require a system call, so one is not more efficient then
the other. The only reason I can see is that exceptions do not map
directly to signals, but that's a very weak argument. Maybe it's
one of those things that was done very long ago, no-one knows why,
and no-one wants to change it?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]