+2004-10-29 Paul Jakma <paul@dishone.st>
+
+ * vty.c: Move setting of sock to O_NONBLOCK from vty_serv_un
+ to vtysh_accept, where sock is the actual fd we wanted to set to
+ O_NONBLOCK, ie the /connected/ vtysh unix socket.
+
2004-10-23 Hasso Tepper <hasso at quagga.net>
* zclient.c: Unbreak reading interface update message. Might fix
return;
}
- /* set to non-blocking*/
- if ( ((flags = fcntl (sock, F_GETFL)) == -1)
- || (fcntl (sock, F_SETFL, flags|O_NONBLOCK) == -1) )
- zlog_warn ("vty_serv_un: could not set vty socket to non-blocking,"
- " %s", strerror (errno));
-
umask (old_mask);
zprivs_get_ids(&ids);
return -1;
}
+ /* set to non-blocking*/
+ if ( ((flags = fcntl (sock, F_GETFL)) == -1)
+ || (fcntl (sock, F_SETFL, flags|O_NONBLOCK) == -1) )
+ zlog_warn ("vty_serv_un: could not set vty socket to non-blocking,"
+ " %s", strerror (errno));
+
#ifdef VTYSH_DEBUG
printf ("VTY shell accept\n");
#endif /* VTYSH_DEBUG */