Don't point STDOUT to SOCK
authorJamie Cameron <jcameron@webmin.com>
Mon, 21 Apr 2008 21:48:28 +0000 (21:48 +0000)
committerJamie Cameron <jcameron@webmin.com>
Mon, 21 Apr 2008 21:48:28 +0000 (21:48 +0000)
fastrpc.cgi

index a583055..8ee5844 100755 (executable)
@@ -54,7 +54,9 @@ untie(*STDOUT);
 # Accept the TCP connection
 $acptaddr = accept(SOCK, MAIN);
 die "accept failed!" if (!$acptaddr);
-select(SOCK); $| = 1;
+$oldsel = select(SOCK);
+$| = 1;
+select($oldsel);
 
 $rcount = 0;
 while(1) {