Remove code, inherited from ipacctctl, which sets socket to non-blocking
mode, since this introduces problems on SMP.
This commit is contained in:
parent
5658abbabd
commit
c41ba5f041
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=141393
@ -43,7 +43,6 @@ static const char rcs_id[] =
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#include <fcntl.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -78,7 +77,7 @@ char ng_nodename[NG_PATHLEN + 1];
|
|||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int flags, c;
|
int c;
|
||||||
char sname[NG_NODESIZ];
|
char sname[NG_NODESIZ];
|
||||||
int rcvbuf = SORCVBUF_SIZE;
|
int rcvbuf = SORCVBUF_SIZE;
|
||||||
char *ng_name;
|
char *ng_name;
|
||||||
@ -108,13 +107,6 @@ main(int argc, char **argv)
|
|||||||
if (NgMkSockNode(sname, &cs, NULL) == -1)
|
if (NgMkSockNode(sname, &cs, NULL) == -1)
|
||||||
err(1, "NgMkSockNode");
|
err(1, "NgMkSockNode");
|
||||||
|
|
||||||
/* set control socket nonblocking */
|
|
||||||
if ((flags = fcntl(cs, F_GETFL, 0)) == -1)
|
|
||||||
err(1, "fcntl(F_GETFL)");
|
|
||||||
flags |= O_NONBLOCK;
|
|
||||||
if (fcntl(cs, F_SETFL, flags) == -1)
|
|
||||||
err(1, "fcntl(F_SETFL)");
|
|
||||||
|
|
||||||
/* set receive buffer size */
|
/* set receive buffer size */
|
||||||
if (setsockopt(cs, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof(int)) == -1)
|
if (setsockopt(cs, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof(int)) == -1)
|
||||||
err(1, "setsockopt(SOL_SOCKET, SO_RCVBUF)");
|
err(1, "setsockopt(SOL_SOCKET, SO_RCVBUF)");
|
||||||
|
Loading…
Reference in New Issue
Block a user