Set socket option for rpc port 67/303467/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 28 Dec 2023 06:10:54 +0000 (15:10 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 28 Dec 2023 06:10:54 +0000 (15:10 +0900)
The SOCK_NONBLOCK option is set for server socket.

Change-Id: Ia6bf43ac4aeeba02a47115a793c01e5b036907c7
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/modules/rpc-port/port_info.cc

index d6b6b07..ab73bdc 100644 (file)
@@ -34,7 +34,7 @@ namespace rpc_port {
 namespace {
 
 int CreateSocket(const std::string& path) {
-  int fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
+  int fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0);
   if (fd < 0) {
     fd = -errno;
     _E("socket() is failed. path(%s), errno(%d)", path.c_str(), errno);