5 * Revision 1.6 1995/05/01 16:27:29 adam
6 * Various improvements. Close-on-exec and close on failure on either
9 * Revision 1.5 1995/04/21 16:38:07 adam
10 * Added more debugging logs.
12 * Revision 1.4 1995/04/20 15:12:45 adam
15 * Revision 1.3 1995/04/19 16:02:06 adam
16 * Some hacks to get the FIFO communication work!! Isn't reliable.
18 * Revision 1.2 1995/03/28 08:03:46 adam
19 * Non-blocking open used when sync is set.
21 * Revision 1.1 1995/03/27 08:24:59 adam
22 * New module gip: Gateway IPc module.
23 * New module gw-db: Gateway hash-db module (user information table).
37 GIP gipc_initialize (const char *name)
39 return gip_initialize (name);
42 int gipc_destroy (GIP gip)
44 return gip_destroy (gip);
47 int gipc_open (GIP gip, const char *server, int sync)
51 gw_log (GW_LOG_DEBUG, "gipc", "Open sync writeonly of %s", server);
52 gip->wfd = open (server, O_WRONLY);
53 gw_log (GW_LOG_DEBUG, "gipc", "got wfd %d", gip->wfd);
55 gw_log (GW_LOG_DEBUG, "gipc", "Open sync readonly of %s", gip->name);
56 gip->rfd = open (gip->name, O_RDONLY);
57 gw_log (GW_LOG_DEBUG, "gipc", "got rfd %d", gip->rfd);
61 gw_log (GW_LOG_DEBUG, "gipc", "Open readonly of %s", gip->name);
62 gip->rfd = open (gip->name, O_RDONLY|O_NONBLOCK);
63 gw_log (GW_LOG_DEBUG, "gipc", "got rfd %d", gip->rfd);
65 gw_log (GW_LOG_DEBUG, "gipc", "Open witeonly of %s", server);
66 gip->wfd = open (server, O_WRONLY|O_NONBLOCK);
67 gw_log (GW_LOG_DEBUG, "gipc", "got wfd %d", gip->wfd);
71 gw_log (GW_LOG_DEBUG, "gipc", "Cannot open %s", gip->name);
81 gw_log (GW_LOG_DEBUG, "gipc", "Cannot open %s", server);
86 fcntl (gip->wfd, F_SETFL, 0);
87 fcntl (gip->rfd, F_SETFL, 0);
88 fcntl (gip->wfd, F_SETFD, FD_CLOEXEC);
89 fcntl (gip->rfd, F_SETFD, FD_CLOEXEC);
93 int gipc_close (GIP gip)