]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/unlinkd.cc
merge changes from SQUID_2_3 branch
[thirdparty/squid.git] / src / unlinkd.cc
index acb435bf19386b683122a4ffdb4e44475f72ca6d..b35921241dff085bbe9a785308d05103be40d9f7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: unlinkd.cc,v 1.32 1999/10/04 05:05:38 wessels Exp $
+ * $Id: unlinkd.cc,v 1.33 1999/12/30 17:37:03 wessels Exp $
  *
  * DEBUG: section 12    Unlink Daemon
  * AUTHOR: Duane Wessels
@@ -188,11 +188,15 @@ unlinkdInit(void)
     commSetTimeout(unlinkd_rfd, -1, NULL, NULL);
     commSetTimeout(unlinkd_wfd, -1, NULL, NULL);
     /*
-     * We leave unlinkd_wfd blocking, because we never want to lose an
-     * unlink request, and we don't have code to retry if we get
-     * EWOULDBLOCK.
+     * unlinkd_rfd should already be non-blocking because of
+     * ipcCreate.  We change unlinkd_wfd to blocking mode because
+     * we never want to lose an unlink request, and we don't have
+     * code to retry if we get EWOULDBLOCK.  Unfortunately, we can
+     * do this only for the IPC_FIFO case.
      */
-    commSetNonBlocking(unlinkd_rfd);
+    assert(fd_table[unlinkd_rfd].flags.nonblocking);
+    if (FD_PIPE == fd_table[unlinkd_wfd].type)
+       commUnsetNonBlocking(unlinkd_wfd);
     debug(12, 1) ("Unlinkd pipe opened on FD %d\n", unlinkd_wfd);
 #else
     debug(12, 1) ("Unlinkd is disabled\n");