From owner-freebsd-questions@FreeBSD.ORG Sat Aug 23 14:03:30 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 363531065684 for ; Sat, 23 Aug 2008 14:03:30 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id E55A18FC13 for ; Sat, 23 Aug 2008 14:03:29 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r55.edvax.de (port-92-195-101-165.dynamic.qsc.de [92.195.101.165]) by mx02.qsc.de (Postfix) with ESMTP id 5A02316C033A; Sat, 23 Aug 2008 16:03:28 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id m7NE3QJi050130; Sat, 23 Aug 2008 16:03:26 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sat, 23 Aug 2008 16:03:26 +0200 From: Polytropon To: "Siju George" Message-Id: <20080823160326.7b19f81c.freebsd@edvax.de> In-Reply-To: References: Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd list Subject: Re: Closing the terminal results in closing of application started by the terminal even if the processes is backgrounded X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2008 14:03:30 -0000 On Sat, 23 Aug 2008 13:36:32 +0530, "Siju George" wrote: > Hi, > > I started Firefox from an xterm. > Then I pressed +Z > And the I typed bg to background Firefox process. > But when I close xterm firefox also closes. > Why is that? When the terminal application (xterm) is closed, the shell (csh) contained in this terminal session closes as well, and it causes all processes that run in this shell (firefox) to close as well via a signal (SIGHUP). Suspending (Ctrl+Z) and returning background jobs (bg) does not matter to the Firefox browser, it keeps running as long as the shell it has been started from is running. In order to prevent firefox from being closed when the starting terminal session is closed, start it via % firefox & It will then eventually put status messages to this xterm, but the shell is free again to accept commands. Another possibility would be to use detach (from the ports), but this program is usually used when you want to keep running a program after you've logged out. -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...