mysqld_safe holding open a pty/tty on FreeBSD (7.x and 8.x)

Ed Schouten ed at 80386.nl
Thu Sep 30 07:03:34 UTC 2010


Hi Jeremy,

* Jeremy Chadwick <freebsd at 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

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20100930/a83e9e65/attachment.pgp


More information about the freebsd-stable mailing list