5 * Revision 1.6 1995/05/02 15:26:52 adam
6 * EINTR obvserved on reads and writes.
8 * Revision 1.5 1995/05/01 16:27:28 adam
9 * Various improvements. Close-on-exec and close on failure on either
12 * Revision 1.4 1995/04/21 16:38:07 adam
13 * Added more debugging logs.
15 * Revision 1.3 1995/04/20 15:12:42 adam
18 * Revision 1.2 1995/03/27 12:52:18 adam
19 * A little more verbose in marc dump.
21 * Revision 1.1 1995/03/27 08:24:58 adam
22 * New module gip: Gateway IPc module.
23 * New module gw-db: Gateway hash-db module (user information table).
41 GIP gip_initialize (const char *name)
43 GIP gip = malloc (sizeof(*gip));
47 if (!(gip->name = malloc (strlen(name)+1)))
52 strcpy (gip->name, name);
53 gip->ret = mknod (gip->name, S_IFIFO|0666, 0);
55 gip->rfd = gip->wfd = -1;
56 gw_log (GW_LOG_DEBUG, "gip", "Creating %s", gip->name);
60 int gip_destroy (GIP gip)
69 int gip_infileno (GIP gip)
74 int gip_outfileno (GIP gip)
79 int gip_errno (GIP gip)
84 int gip_read (GIP gip, char *buf, size_t count)
91 r = read (gip->rfd, buf+no, count-no);
105 int gip_write (GIP gip, const char *buf, size_t count)
112 r = write (gip->wfd, buf+no, count-no);
126 int gip_wline (GIP gip, const char *buf)
128 return gip_write (gip, buf, strlen(buf));