From 00b4ed0ab0dace63e5824bc16d1e0cc414289bcc Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 20 Apr 1995 15:12:24 +0000 Subject: [PATCH] Minor hacks really. --- kernel/eti.c | 10 +++++----- util/gip.c | 6 +++++- util/gipc.c | 11 ++++++++++- util/gips.c | 17 ++++++++++++++--- 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/kernel/eti.c b/kernel/eti.c index 325e579..99e7370 100644 --- a/kernel/eti.c +++ b/kernel/eti.c @@ -2,7 +2,10 @@ * Europagate, 1995 * * $Log: eti.c,v $ - * Revision 1.7 1995/04/19 16:01:57 adam + * Revision 1.8 1995/04/20 15:12:24 adam + * Minor hacks really. + * + * Revision 1.7 1995/04/19 16:01:57 adam * Some hacks to get the FIFO communication work!! Isn't reliable. * Resource gw.account added - default account info. * @@ -102,7 +105,7 @@ static void start_kernel (int argc, char **argv, int id) } if (!pid) { - execvp ("kernel", argv_p); + execv ("kernel", argv_p); gw_log (GW_LOG_FATAL|GW_LOG_ERRNO, module, "execvp"); exit (1); } @@ -195,15 +198,12 @@ int main (int argc, char **argv) r = gipc_open (gip, fifo_server_name, 0); else if (pass == 2) { -#if 0 gipc_close (gip); -#endif gipc_destroy (gip); unlink (fifo_server_name); unlink (fifo_client_name); gip = gipc_initialize (fifo_client_name); start_kernel (argc, argv, id); - sleep (2); r = gipc_open (gip, fifo_server_name, 1); } else if (pass == 3) diff --git a/util/gip.c b/util/gip.c index b67a856..488d539 100644 --- a/util/gip.c +++ b/util/gip.c @@ -2,7 +2,10 @@ * Europagate, 1995 * * $Log: gip.c,v $ - * Revision 1.2 1995/03/27 12:52:18 adam + * Revision 1.3 1995/04/20 15:12:42 adam + * Minor hacks really. + * + * Revision 1.2 1995/03/27 12:52:18 adam * A little more verbose in marc dump. * * Revision 1.1 1995/03/27 08:24:58 adam @@ -37,6 +40,7 @@ GIP gip_initialize (const char *name) strcpy (gip->name, name); gip->ret = mknod (gip->name, S_IFIFO|0666, 0); gip->errno = errno; + gip->rfd = gip->wfd = -1; return gip; } diff --git a/util/gipc.c b/util/gipc.c index 7066e00..1834246 100644 --- a/util/gipc.c +++ b/util/gipc.c @@ -2,7 +2,10 @@ * Europagate, 1995 * * $Log: gipc.c,v $ - * Revision 1.3 1995/04/19 16:02:06 adam + * Revision 1.4 1995/04/20 15:12:45 adam + * Minor hacks really. + * + * 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 @@ -60,8 +63,14 @@ int gipc_open (GIP gip, const char *server, int sync) int gipc_close (GIP gip) { if (gip->rfd != -1) + { close (gip->rfd); + gip->rfd = -1; + } if (gip->wfd != -1) + { close (gip->wfd); + gip->wfd = -1; + } return 0; } diff --git a/util/gips.c b/util/gips.c index b5da5ef..ebc5abb 100644 --- a/util/gips.c +++ b/util/gips.c @@ -2,7 +2,10 @@ * Europagate, 1995 * * $Log: gips.c,v $ - * Revision 1.2 1995/04/19 16:02:06 adam + * Revision 1.3 1995/04/20 15:12:46 adam + * Minor hacks really. + * + * Revision 1.2 1995/04/19 16:02:06 adam * Some hacks to get the FIFO communication work!! Isn't reliable. * * Revision 1.1 1995/03/27 08:25:00 adam @@ -46,7 +49,15 @@ int gips_open (GIP gip, const char *client) int gips_close (GIP gip) { - close (gip->rfd); - close (gip->wfd); + if (gip->rfd != -1) + { + close (gip->rfd); + gip->rfd = -1; + } + if (gip->wfd != -1) + { + close (gip->wfd); + gip->wfd = -1; + } return 0; } -- 1.7.10.4