The expect spawn command and unbuffer both fail if /dev/pts is mounted with mode 600 and no gid specified. This is on a SLES 12 system, expect version 5.45.
dgloe@nid00005:~> mount | grep pts
devpts on /dev/pts type devpts (rw,relatime,mode=600)
dgloe@nid00005:~> unbuffer /bin/true
The system has no more ptys. Ask your system administrator to create more.
dgloe@nid00005:~> expect
expect1.1> spawn /bin/true
spawn /bin/true
The system has no more ptys. Ask your system administrator to create more.