Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Sep 2010 09:03:33 +0200
From:      Ed Schouten <ed@80386.nl>
To:        Jeremy Chadwick <freebsd@jdc.parodius.com>
Cc:        freebsd-stable@freebsd.org, ale@FreeBSD.org
Subject:   Re: mysqld_safe holding open a pty/tty on FreeBSD (7.x and 8.x)
Message-ID:  <20100930070333.GU87427@hoeg.nl>
In-Reply-To: <20100930065151.GA9634@icarus.home.lan>
References:  <20100930065151.GA9634@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help

--QxSStYAgvEtE+iQJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Jeremy,

* Jeremy Chadwick <freebsd@jdc.parodius.com> 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 <ed@80386.nl>
 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100930070333.GU87427>