cleanup diffs
diff --git a/serverloop.c b/serverloop.c
index 79bdf77..58e901d 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -402,7 +402,9 @@
 	/* nonblocking IO */
 	set_nonblock(fdin);
 	set_nonblock(fdout);
-	set_nonblock(fderr);
+	/* we don't have stderr for interactive terminal sessions, see below */
+	if (fderr != -1)
+		set_nonblock(fderr);
 
 	connection_in = packet_get_connection_in();
 	connection_out = packet_get_connection_out();