https://github.com/Tyriar/node-pty/blob/master/src/unix/pty.cc#L250
The name is unlikely to be longer than 40 chars, but possible by remounting devfs somewhere else. It is better to initalize the pty with NULL in name and get the fs path later with ptsname.