summary refs log tree commit diff
path: root/Functions/TCP
diff options
context:
space:
mode:
Diffstat (limited to 'Functions/TCP')
-rw-r--r--Functions/TCP/tcp_fd_handler4
-rw-r--r--Functions/TCP/tcp_read2
-rw-r--r--Functions/TCP/tcp_send2
-rw-r--r--Functions/TCP/tcp_sess2
4 files changed, 5 insertions, 5 deletions
diff --git a/Functions/TCP/tcp_fd_handler b/Functions/TCP/tcp_fd_handler
index 012fd4d87..33f553536 100644
--- a/Functions/TCP/tcp_fd_handler
+++ b/Functions/TCP/tcp_fd_handler
@@ -20,14 +20,14 @@ else
   zle -I
   # Handle fds not in the TCP set similarly.
   # This does the drain thing, to try and get as much data out as possible.
-  if ! read line <&$1; then
+  if ! read -u $1 line; then
     print "[Reading on $1 failed; removing from poll list]" >& 2
     zle -F $1
     return 1
   fi
   line="fd$1:$line"
   local newline
-  while read -t newline <&$1; do
+  while read -u $1 -t newline; do
     line="${line}
 fd$1:$newline"
   done
diff --git a/Functions/TCP/tcp_read b/Functions/TCP/tcp_read
index 51e5356cc..f70bd798c 100644
--- a/Functions/TCP/tcp_read
+++ b/Functions/TCP/tcp_read
@@ -190,7 +190,7 @@ while (( ${#read_fds} )); do
     print "[tcp_read: returned fds ${reply}]" >&2
   fi
   for read_fd in ${reply[2,-1]}; do
-    if ! read -r line <&$read_fd; then
+    if ! read -u $read_fd -r line; then
       unset "read_fds[$read_fd]"
       stat=1
       continue
diff --git a/Functions/TCP/tcp_send b/Functions/TCP/tcp_send
index c5f902f71..c6d8ad637 100644
--- a/Functions/TCP/tcp_send
+++ b/Functions/TCP/tcp_send
@@ -62,7 +62,7 @@ for TCP_SESS in $sessions; do
 	mystat=1
 	continue
     fi
-    print $nonewline -r -- $* >&$fd
+    print -u $fd $nonewline -r -- $*
     if [[ $? -ne 0 || -n $TCP_FD_CLOSED ]]; then
 	print "Session ${TCP_SESS}: fd $fd unusable." >&2
 	unset TCP_FD_CLOSED
diff --git a/Functions/TCP/tcp_sess b/Functions/TCP/tcp_sess
index ee3d268b3..a07c33a03 100644
--- a/Functions/TCP/tcp_sess
+++ b/Functions/TCP/tcp_sess
@@ -33,7 +33,7 @@ for name in ${(ko)tcp_by_name}; do
   else
     cur=
   fi
-  print "sess:$name; fd:$fd$cur" >&$__myfd
+  print -u $__myfd "sess:$name; fd:$fd$cur"
 done
 
 return $(( __myfd - 1 ))