From owner-freebsd-stable@FreeBSD.ORG Thu Mar 4 06:58:02 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF1B816A4D0 for ; Thu, 4 Mar 2004 06:58:02 -0800 (PST) Received: from smtp.atlantis.dp.ua (smtp.atlantis.dp.ua [193.108.46.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C37D43D1D for ; Thu, 4 Mar 2004 06:58:01 -0800 (PST) (envelope-from dmitry@atlantis.dp.ua) Received: from smtp.atlantis.dp.ua (smtp.atlantis.dp.ua [193.108.46.231]) by smtp.atlantis.dp.ua (8.12.6p2/8.12.6) with ESMTP id i24EvXbh025004; Thu, 4 Mar 2004 16:57:33 +0200 (EET) (envelope-from dmitry@atlantis.dp.ua) Date: Thu, 4 Mar 2004 16:57:33 +0200 (EET) From: Dmitry Pryanishnikov To: stable@freebsd.org Message-ID: <20040304164910.G22709@atlantis.atlantis.dp.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Eugene Grosbein Subject: Re: Linux emulation, rc.d and SIGHUP X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2004 14:58:03 -0000 Hello! > From: Eugene Grosbein > > I've Linux multithreading daemon running under FreeBSD 4.9-STABLE > (cvsup'd today). Being started in multiuser, it goes backgroup and runs OK. > Being started at boot time from rc.d script, it starts and quickly > shuts down. > > ktrace(1) show that it receives SIGHUP in the latter case. > Is it a bug in the Linux emulation? If not, how can I avoid this SIGHUP? No, native applications (for example, shell scripts) will also receive SIGHUP at the end of boot process if they don't daemonize themself (note that going to background != daemon(3)). Fortunately, we have daemon(8) utility now. So I've replaced '/etc/ppp/start &' with 'daemon /etc/ppp/start' everywhere to get rid of this annoying SIGHUPs. Sincerely, Dmitry -- Atlantis ISP, System Administrator e-mail: dmitry@atlantis.dp.ua nic-hdl: LYNX-RIPE