From owner-freebsd-hackers Sat Jul 21 19:17:33 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from sharmas.dhs.org (cpe-66-1-147-119.ca.sprintbbd.net [66.1.147.119]) by hub.freebsd.org (Postfix) with ESMTP id 1F46A37B401 for ; Sat, 21 Jul 2001 19:17:31 -0700 (PDT) (envelope-from adsharma@sharmas.dhs.org) Received: by sharmas.dhs.org (Postfix, from userid 500) id 267E05DD97; Sat, 21 Jul 2001 19:17:47 -0700 (PDT) Date: Sat, 21 Jul 2001 19:17:47 -0700 From: Arun Sharma To: hackers@freebsd.org Subject: libc_r, signals and modifying sigcontext Message-ID: <20010721191747.A32529@sharmas.dhs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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