Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jul 2001 19:17:47 -0700
From:      Arun Sharma <arun@sharmas.dhs.org>
To:        hackers@freebsd.org
Subject:   libc_r, signals and modifying sigcontext
Message-ID:  <20010721191747.A32529@sharmas.dhs.org>

next in thread | raw e-mail | index | archive | help
Greetings. I'm trying to port an application to FreeBSD. I have
a signal handler registered using signal(2). It modifies the
data pointed to by the third argument - of type sigcontext (specifically
sc_eip) - so that the execution would resume at a different point).

However, when execution resumes, it resumes at the same point where
it was interrupted. A quick search of the archives brought up this
thread:

http://groups.google.com/groups?hl=en&safe=off&th=6d5b8c3ead4a79ab,5&seekm=9fo8vq%241ma8%241%40FreeBSD.csie.NCTU.edu.tw#p

I tried:

_thread_sys_sigreturn(sc);

as suggested, but truss shows that sigreturn is failing. So my question
is: what is the correct way to modify the sigcontext in FreeBSD ? Are
there other multi threaded apps (using pthreads, linked to libc_r),
which do this ?

	-Arun

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010721191747.A32529>