I'm using lldb as a lib and I need to redirect inferior stdin/out/err to my own pts.
However, I find that, if the path matches with "/dev/pts/", it will be changed to NULL.
One workaround is to make symbolic link sto my dev/pts/x to bypass the problem.
The attached patch provides a fix for the issue.