unix: Synchronized opening pseudo terminal master/slave - otherwise 'ptsname()' could return same slave name for different masters (created from different threads)
Merge pull request #10 from pchel-/master

unix: Synchronized opening pseudo terminal master/slave