From owner-freebsd-stable@FreeBSD.ORG Thu Sep 30 07:03:34 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1FD1106566C; Thu, 30 Sep 2010 07:03:34 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (unknown [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 262828FC16; Thu, 30 Sep 2010 07:03:34 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 46E3C2A28CF9; Thu, 30 Sep 2010 09:03:33 +0200 (CEST) Date: Thu, 30 Sep 2010 09:03:33 +0200 From: Ed Schouten To: Jeremy Chadwick Message-ID: <20100930070333.GU87427@hoeg.nl> References: <20100930065151.GA9634@icarus.home.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QxSStYAgvEtE+iQJ" Content-Disposition: inline In-Reply-To: <20100930065151.GA9634@icarus.home.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@freebsd.org, ale@FreeBSD.org Subject: Re: mysqld_safe holding open a pty/tty on FreeBSD (7.x and 8.x) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 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, 30 Sep 2010 07:03:34 -0000 --QxSStYAgvEtE+iQJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Jeremy, * Jeremy Chadwick wrote: > 1) "mysqld_safe > /dev/null 2>&1 &" never released the tty > 2) "nohup mysqld_safe > /dev/null 2>&1 &" did release the tty What happens if you run the following command? daemon -cf mysqld_safe The point is that FreeBSD's pts(4) driver only deallocates TTYs when it's really sure nothing uses it anymore. Even if there is not a single file descriptor referring to the slave device, it has to wait until there exist no processes which have the TTY as its controlling TTY. The `pstat -t' command is quite useful to figure out whether there is still a session associated with the TTY. See the following thread: http://lists.freebsd.org/pipermail/freebsd-ports/2010-July/062417.html --=20 Ed Schouten WWW: http://80386.nl/ --QxSStYAgvEtE+iQJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAkykNkUACgkQ52SDGA2eCwUNZQCfe9pqbfGllCbI8eBnrUUeMNb5 ebQAnitV3htvjRs9sEzipAVR6viULUQl =bmVt -----END PGP SIGNATURE----- --QxSStYAgvEtE+iQJ--