mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 04:40:21 +00:00
2004-08-18 Paul Jakma <paul@dishone.st>
* vty.c: (vty_serv_un) set unix vty socket to nonblocking to prevent inadvertent blocking of daemons by use of vtysh. TODO: disentangle manual paging from the buffer_write path so that unix vty can use this path too and be reliable.
This commit is contained in:
parent
2990460691
commit
c0618de64c
@ -1,3 +1,10 @@
|
|||||||
|
2004-08-18 Paul Jakma <paul@dishone.st>
|
||||||
|
|
||||||
|
* vty.c: (vty_serv_un) set unix vty socket to nonblocking
|
||||||
|
to prevent inadvertent blocking of daemons by use of
|
||||||
|
vtysh. TODO: disentangle manual paging from the buffer_write
|
||||||
|
path so that unix vty can use this path too and be reliable.
|
||||||
|
|
||||||
2004-07-23 Greg Troxel <gdt@poblano.ir.bbn.com>
|
2004-07-23 Greg Troxel <gdt@poblano.ir.bbn.com>
|
||||||
|
|
||||||
* sockopt.c (getsockopt_ipv4_pktinfo_ifindex): Make this compile
|
* sockopt.c (getsockopt_ipv4_pktinfo_ifindex): Make this compile
|
||||||
|
@ -1856,7 +1856,7 @@ void
|
|||||||
vty_serv_un (char *path)
|
vty_serv_un (char *path)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
int sock, len;
|
int sock, len, flags;
|
||||||
struct sockaddr_un serv;
|
struct sockaddr_un serv;
|
||||||
mode_t old_mask;
|
mode_t old_mask;
|
||||||
struct zprivs_ids_t ids;
|
struct zprivs_ids_t ids;
|
||||||
@ -1901,6 +1901,12 @@ vty_serv_un (char *path)
|
|||||||
return;
|
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);
|
umask (old_mask);
|
||||||
|
|
||||||
zprivs_get_ids(&ids);
|
zprivs_get_ids(&ids);
|
||||||
|
Loading…
Reference in New Issue
Block a user