[Mono-list] Re: [Mono-cvs-list] Mono CVS: mono martin
Martin Baulig
martin@gnome.org
16 Jan 2003 17:14:32 +0100
dietmar <dietmar@ximian.com> writes:
> I doubt that this is correct, because libpthreads has its own
> implementation of sigaction(), and I think we should call that to ensure
> correct behaviour?
Well, I don't know why this ever worked on Linux without the SYS_sigaction. From a look
at the glibc source code, it should not:
====[glibc-2.2.5/linuxthreads/signal.c]=====
int __sigaction(int sig, const struct sigaction * act,
struct sigaction * oact)
{
struct sigaction newact;
struct sigaction *newactp;
if (sig == __pthread_sig_restart ||
sig == __pthread_sig_cancel ||
(sig == __pthread_sig_debug && __pthread_sig_debug > 0))
{
__set_errno (EINVAL);
return -1;
}
/* .... more stuff below .... */
}
strong_alias(__sigaction, sigaction)
====
That's also how it works on FreeBSD - you cannot install a handler for the thread restart
and cancel signals.
--
Martin Baulig
martin@gnome.org
martin@ximian.com