From owner-freebsd-questions@FreeBSD.ORG Wed Oct 15 16:53:36 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D8D5FA0 for ; Wed, 15 Oct 2014 16:53:36 +0000 (UTC) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 517F5C7 for ; Wed, 15 Oct 2014 16:53:36 +0000 (UTC) Received: from r56.edvax.de (port-92-195-30-92.dynamic.qsc.de [92.195.30.92]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 0C3EA3CECD; Wed, 15 Oct 2014 18:53:27 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s9FGrRYn002059; Wed, 15 Oct 2014 18:53:27 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 15 Oct 2014 18:53:27 +0200 From: Polytropon To: William Bulley Subject: Re: exiting Xorg locks up 9.2-STABLE system Message-Id: <20141015185327.4fc2590d.freebsd@edvax.de> In-Reply-To: <20141015162547.GJ3963@itcom245.staff.itd.umich.edu> References: <20141015162547.GJ3963@itcom245.staff.itd.umich.edu> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Oct 2014 16:53:36 -0000 On Wed, 15 Oct 2014 12:25:47 -0400, William Bulley wrote: > According to Polytropon on Wed, 10/15/14 at 12:18: > > > > The last line of your ~/.xinitrc file should be: > > > > exec /usr/local/bin/mwm > > > > This makes sure that the process "continues" as mwm, and when > > mwm exits, then X also exists. > > Thanks. The last line of my ~/.xinitrc file is: > > /usr/local/bin/mwm 2>&1 /dev/null > > and since I start Xorg thusly: > > /usr/local/bin/xinit -- /usr/local/bin/Xorg > > I had thought when I exit mwm(1) using the "f.quit_mwm" feature, > that then Xorg would exit. Is that not the case? Or am I missing > your point above? This configuration has been working for me for > about fifteen years. :-) Interesting, but it's not what The FreeBSD Handbook suggests and what _I_ have been using for about fifteen years. :-) The "exec" statement makes the xinit process "continue" as the window manager process. Its f.quit_mwm function exits the mwm program, but that does not have any effect on the X session - the session continues without a window manager (which is possible). Only if the X process is "connected" to the window manager process using "exec", it will exit, and so quit the X session entirely. This is what "init" or "startx" help to do: They source the .xinitrc file and execute it. Its last line, the "exec" statement, creates the "connection" between the X session and the program which has control over its life, usually the window manager - but it could also be an xterm, and when _that_ xterm is closed, the X session terminates. The line "exec /usr/local/bin/mwm" will do this. More details here: https://www.freebsd.org/doc/handbook/x11-wm.html -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...