Pty::path is a manual implementation of write! that also allocates.
Using write! avoids the alloc and is simpler too.
The original function didn't return an error even if called with a small
buffer and this version preserves that.
This is a POSIX extension to disable control chars when set in the c_cc
array. Fish and other programs use it.
See:
* redox-os/relibc!689
* redox-os/termios!3