commit 758de80

uint  ·  2026-10-31 15:34:02 +0000 UTC
parent 07ba4d7
Pipe: Add user configurable timeout
2 files changed,  +5, -1
+4, -0
 1@@ -6,6 +6,10 @@
 2 #include <sys/un.h>
 3 #include <unistd.h>
 4 
 5+#ifndef ULEPIPE_TIMEOUT
 6+#define ULEPIPE_TIMEOUT 5
 7+#endif
 8+
 9 typedef struct {
10 	int       fd;
11 	socklen_t peer_len;
+1, -1
1@@ -67,7 +67,7 @@ ulepipe_send(const char* path, void* data, size_t size)
2 	struct sockaddr_un client = { 0 };
3 	struct msghdr msg = { 0 };
4 	struct iovec iov = { 0 };
5-	struct timeval timeout = { 5, 0 };
6+	struct timeval timeout = { ULEPIPE_TIMEOUT, 0 };
7 	char dir[64] = { 0 };
8 	int sverrno = 0;
9 	ssize_t n = -1;