5 * Revision 1.5 1995/05/01 16:27:28 adam
6 * Various improvements. Close-on-exec and close on failure on either
9 * Revision 1.4 1995/04/21 16:38:07 adam
10 * Added more debugging logs.
12 * Revision 1.3 1995/04/20 15:12:42 adam
15 * Revision 1.2 1995/03/27 12:52:18 adam
16 * A little more verbose in marc dump.
18 * Revision 1.1 1995/03/27 08:24:58 adam
19 * New module gip: Gateway IPc module.
20 * New module gw-db: Gateway hash-db module (user information table).
38 GIP gip_initialize (const char *name)
40 GIP gip = malloc (sizeof(*gip));
44 if (!(gip->name = malloc (strlen(name)+1)))
49 strcpy (gip->name, name);
50 gip->ret = mknod (gip->name, S_IFIFO|0666, 0);
52 gip->rfd = gip->wfd = -1;
53 gw_log (GW_LOG_DEBUG, "gip", "Creating %s", gip->name);
57 int gip_destroy (GIP gip)
66 int gip_infileno (GIP gip)
71 int gip_outfileno (GIP gip)
76 int gip_errno (GIP gip)
81 int gip_read (GIP gip, char *buf, size_t count)
86 r = read (gip->rfd, buf+no, count-no);
97 int gip_write (GIP gip, const char *buf, size_t count)
102 r = write (gip->wfd, buf+no, count-no);
113 int gip_wline (GIP gip, const char *buf)
115 return gip_write (gip, buf, strlen(buf));