From owner-freebsd-questions@FreeBSD.ORG Wed Mar 5 21:26:34 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CF5B106566B for ; Wed, 5 Mar 2008 21:26:34 +0000 (UTC) (envelope-from martin@dc.cis.okstate.edu) Received: from m.it.okstate.edu (m.it.okstate.edu [139.78.2.129]) by mx1.freebsd.org (Postfix) with ESMTP id D41BD8FC1E for ; Wed, 5 Mar 2008 21:26:33 +0000 (UTC) (envelope-from martin@dc.cis.okstate.edu) Received: from dc.cis.okstate.edu (localhost.it.okstate.edu [127.0.0.1]) by m.it.okstate.edu (8.13.8/8.13.8) with ESMTP id m25LQX7J035593 for ; Wed, 5 Mar 2008 15:26:33 -0600 (CST) (envelope-from martin@dc.cis.okstate.edu) Message-Id: <200803052126.m25LQX7J035593@m.it.okstate.edu> To: freebsd-questions@freebsd.org Date: Wed, 05 Mar 2008 15:26:33 -0600 From: Martin McCormick Subject: SIGHUP and Program Flow in a 6.2 Application X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 21:26:34 -0000 A SIGHUP signal to a running process needs a signal handler like signal( SIGHUP ,startlogging); What sort of end statement needs to be in the function called to allow program execution to resume back in the main caller? I had put a return; statement in the function and noticed that things were wrong after the application stopped catching the SIGHUP after the first call. A gdb trace shows that the signal causes a branch to the code pointed to by the signal statement. The code runs and then if it reaches the return; statement, the flow is lost and knows not where to go next. Thank you. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Network Operations Group