I have had time to look some more at the problem of leaking ptys. It seems as thou ptys becomes unavailable (Input/output error on access) and eventually you run out of free ptys. The problem is documented here: http://people.freebsd.org/~pho/stress/log/ptys.html -- Peter Holm