|
@@ -216,7 +216,7 @@ static int send_cmd(int rpc_fd, char *cmd)
|
|
#endif
|
|
#endif
|
|
/* Combine command flag+payload with RPC metadata */
|
|
/* Combine command flag+payload with RPC metadata */
|
|
memcpy(&metabuf[IDX_PAYLOAD], cmd, PAYLOAD_SZ);
|
|
memcpy(&metabuf[IDX_PAYLOAD], cmd, PAYLOAD_SZ);
|
|
- usleep(100000);
|
|
|
|
|
|
+ //usleep(100000);
|
|
int n_write = write(rpc_fd, &metabuf, BUF_SZ);
|
|
int n_write = write(rpc_fd, &metabuf, BUF_SZ);
|
|
if(n_write < 0){
|
|
if(n_write < 0){
|
|
dwr(MSG_DEBUG,"Error writing command to service (CMD = %d)\n", cmd[0]);
|
|
dwr(MSG_DEBUG,"Error writing command to service (CMD = %d)\n", cmd[0]);
|
|
@@ -395,7 +395,6 @@ int setsockopt(SETSOCKOPT_SIG)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
/*------------------------------------------------------------------------------
|
|
/*------------------------------------------------------------------------------
|
|
--------------------------------- getsockopt() ---------------------------------
|
|
--------------------------------- getsockopt() ---------------------------------
|
|
------------------------------------------------------------------------------*/
|
|
------------------------------------------------------------------------------*/
|
|
@@ -689,7 +688,6 @@ int accept4(ACCEPT4_SIG)
|
|
return newfd;
|
|
return newfd;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
/*------------------------------------------------------------------------------
|
|
/*------------------------------------------------------------------------------
|
|
----------------------------------- accept() -----------------------------------
|
|
----------------------------------- accept() -----------------------------------
|
|
------------------------------------------------------------------------------*/
|
|
------------------------------------------------------------------------------*/
|
|
@@ -761,7 +759,7 @@ int accept(ACCEPT_SIG)
|
|
/* The following line is required for libuv/nodejs to accept connections properly,
|
|
/* The following line is required for libuv/nodejs to accept connections properly,
|
|
however, this has the side effect of causing certain webservers to max out the CPU
|
|
however, this has the side effect of causing certain webservers to max out the CPU
|
|
in an accept loop */
|
|
in an accept loop */
|
|
- fcntl(sockfd, F_SETFL, O_NONBLOCK);
|
|
|
|
|
|
+ fcntl(sockfd, F_SETFL, SOCK_NONBLOCK);
|
|
int new_conn_socket = get_new_fd(sockfd);
|
|
int new_conn_socket = get_new_fd(sockfd);
|
|
|
|
|
|
if(new_conn_socket > 0)
|
|
if(new_conn_socket > 0)
|
|
@@ -850,7 +848,7 @@ int listen(LISTEN_SIG)
|
|
}
|
|
}
|
|
|
|
|
|
/*------------------------------------------------------------------------------
|
|
/*------------------------------------------------------------------------------
|
|
--------------------------------------- clone()----------------------------------
|
|
|
|
|
|
+-------------------------------------- clone() ---------------------------------
|
|
------------------------------------------------------------------------------*/
|
|
------------------------------------------------------------------------------*/
|
|
|
|
|
|
/* int (*fn)(void *), void *child_stack, int flags, void *arg, ... */
|
|
/* int (*fn)(void *), void *child_stack, int flags, void *arg, ... */
|
|
@@ -867,7 +865,7 @@ int clone(CLONE_SIG)
|
|
}
|
|
}
|
|
|
|
|
|
/*------------------------------------------------------------------------------
|
|
/*------------------------------------------------------------------------------
|
|
-------------------------------------- close()-----------------------------------
|
|
|
|
|
|
+------------------------------------- close() ----------------------------------
|
|
------------------------------------------------------------------------------*/
|
|
------------------------------------------------------------------------------*/
|
|
|
|
|
|
/* int fd */
|
|
/* int fd */
|
|
@@ -887,7 +885,7 @@ int close(CLOSE_SIG)
|
|
}
|
|
}
|
|
|
|
|
|
/*------------------------------------------------------------------------------
|
|
/*------------------------------------------------------------------------------
|
|
--------------------------------------- dup2()-----------------------------------
|
|
|
|
|
|
+-------------------------------------- dup2() ----------------------------------
|
|
------------------------------------------------------------------------------*/
|
|
------------------------------------------------------------------------------*/
|
|
|
|
|
|
/* int oldfd, int newfd */
|
|
/* int oldfd, int newfd */
|
|
@@ -910,7 +908,7 @@ int dup2(DUP2_SIG)
|
|
}
|
|
}
|
|
|
|
|
|
/*------------------------------------------------------------------------------
|
|
/*------------------------------------------------------------------------------
|
|
--------------------------------------- dup3()-----------------------------------
|
|
|
|
|
|
+-------------------------------------- dup3() ----------------------------------
|
|
------------------------------------------------------------------------------*/
|
|
------------------------------------------------------------------------------*/
|
|
|
|
|
|
/* int oldfd, int newfd, int flags */
|
|
/* int oldfd, int newfd, int flags */
|
|
@@ -933,7 +931,7 @@ int dup3(DUP3_SIG)
|
|
}
|
|
}
|
|
|
|
|
|
/*------------------------------------------------------------------------------
|
|
/*------------------------------------------------------------------------------
|
|
--------------------------------------- getsockname()----------------------------
|
|
|
|
|
|
+-------------------------------- getsockname() ---------------------------------
|
|
------------------------------------------------------------------------------*/
|
|
------------------------------------------------------------------------------*/
|
|
|
|
|
|
/* define GETSOCKNAME_SIG int sockfd, struct sockaddr *addr, socklen_t *addrlen */
|
|
/* define GETSOCKNAME_SIG int sockfd, struct sockaddr *addr, socklen_t *addrlen */
|
|
@@ -977,7 +975,7 @@ int getsockname(GETSOCKNAME_SIG)
|
|
}
|
|
}
|
|
|
|
|
|
/*------------------------------------------------------------------------------
|
|
/*------------------------------------------------------------------------------
|
|
------------------------------------- syscall()----------------------------------
|
|
|
|
|
|
+------------------------------------ syscall() ---------------------------------
|
|
------------------------------------------------------------------------------*/
|
|
------------------------------------------------------------------------------*/
|
|
|
|
|
|
long syscall(SYSCALL_SIG){
|
|
long syscall(SYSCALL_SIG){
|