So, although redirects to other active file-descriptors work as expected, as do redirections to files and the /dev/null device, I cannot redirect successfully to a different tty:
$ node -e 'process.stdout.write("wtf!\n")' 1>/dev/ttys014
wtf!
Example:
# First term: β# Second term:
β
$ tty β$ tty
/dev/ttys013 β/dev/ttys014
$ echo 'abc' 1>/dev/ttys014 β$ cat
$ ruby -e '$stdout.puts "okay"' 1>/dev/ttys014 βabc
$ node -e 'process.stdout.write("wtf!\n")' 1>/dev/ttys014 βokay
wtf! β
$ node -e 'process.stdout.write("this works\n")' 1>/dev/null β
$ node -e 'process.stdout.write("this too\n")' 1>output β
$ cat output β
this too β
Environment:
System: Mac OS X El Capitan 10.11.1
Shell: Zsh 5.1.1 (x86_64-apple-darwin15.0.0)
Node: v4.2.3
So, although redirects to other active file-descriptors work as expected, as do redirections to files and the
/dev/nulldevice, I cannot redirect successfully to a differenttty:Example:
Environment:
System: Mac OS X El Capitan
10.11.1Shell: Zsh
5.1.1 (x86_64-apple-darwin15.0.0)Node: v
4.2.3