From owner-freebsd-hackers Fri Oct 15 9: 6:55 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from citadel.cequrux.com (citadel.cdsec.com [192.96.22.18]) by hub.freebsd.org (Postfix) with ESMTP id D883C15462 for ; Fri, 15 Oct 1999 09:06:17 -0700 (PDT) (envelope-from gram@cequrux.com) Received: (from nobody@localhost) by citadel.cequrux.com (8.9.3/8.9.3) id SAA17797; Fri, 15 Oct 1999 18:05:31 +0200 (SAST) Received: by citadel.cequrux.com via recvmail id 17793; Fri Oct 15 18:04:49 1999 From: Graham Wheeler To: "Dodge Ram" , freebsd-hackers@FreeBSD.ORG Subject: Re: Handling segV's Date: Fri, 15 Oct 1999 17:57:58 +0200 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain References: <19991015153003.54337.qmail@cequrux.com> In-Reply-To: <19991015153003.54337.qmail@cequrux.com> MIME-Version: 1.0 Message-Id: <9910151800080A.11153@cequrux.com> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 15 Oct 1999, Dodge Ram wrote: > Hi, > > I am looking at ways to handle segV's gracefully without > letting a process die. I am aware of the siglongjmp() call and don't > know if that is the only way to handle segV's > > Any pointers on how to gracefully (?) handle segV and not > letting the process die will be of great help. > > Also, given that I have a solution to test, what are all the > ways I can ensure that my process handles segV's rightly ? Well, you can't return from the signal handler, as that will just cause the SEGV again. Also, you shouldn't do any heap manipulation from within the signal handler (that may have changed now that there is thread support, but certainly in older systems these routines are no re-entrant). So that will limit your options considerably... -- Dr Graham Wheeler E-mail: gram@cequrux.com Cequrux Technologies Phone: +27(21)423-6065/6/7 Firewalls/Virtual Private Networks Fax: +27(21)24-3656 Data/Network Security Specialists WWW: http://www.cequrux.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message