Some hacks to get the FIFO communication work!! Isn't reliable.
[egate.git] / util / gipc.c
index bd224d0..7066e00 100644 (file)
@@ -2,7 +2,10 @@
  * Europagate, 1995
  *
  * $Log: gipc.c,v $
- * Revision 1.2  1995/03/28 08:03:46  adam
+ * Revision 1.3  1995/04/19 16:02:06  adam
+ * Some hacks to get the FIFO communication work!! Isn't reliable.
+ *
+ * Revision 1.2  1995/03/28  08:03:46  adam
  * Non-blocking open used when sync is set.
  *
  * Revision 1.1  1995/03/27  08:24:59  adam
@@ -18,6 +21,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 
+#include <gw-log.h>
 #include <gip.h>
 
 GIP gipc_initialize (const char *name)
@@ -34,7 +38,9 @@ int gipc_open (GIP gip, const char *server, int sync)
 {
     if (sync) 
     {
+        gw_log (GW_LOG_DEBUG, "gipc", "Open readonly of %s", gip->name);
         gip->rfd = open (gip->name, O_RDONLY);
+        gw_log (GW_LOG_DEBUG, "gipc", "Open writeonly of %s", server);
        gip->wfd = open (server, O_WRONLY);
     }
     else
@@ -46,8 +52,8 @@ int gipc_open (GIP gip, const char *server, int sync)
         return -1;
     if (gip->wfd == -1)
         return -2;
-    fcntl (gip->wfd, F_SETFL, ~(O_NONBLOCK|O_APPEND));
-    fcntl (gip->rfd, F_SETFL, ~(O_NONBLOCK|O_APPEND));
+    fcntl (gip->wfd, F_SETFL, 0);
+    fcntl (gip->rfd, F_SETFL, 0);
     return 0;
 }