[pisa-src] r1509 - in trunk: pisacd/cdmain.c pisasd/sdmain.c

  • From: René Hummen <rene.hummen@xxxxxxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Tue, 03 Nov 2009 18:09:09 +0100

Author: hummen
Date: Tue Nov  3 18:09:08 2009
New Revision: 1509

Log:
fixed commit 1505 to not wait indefinitely and just complain once

(as discussed on the mailing list)

Modified:
   trunk/pisacd/cdmain.c
   trunk/pisasd/sdmain.c

Modified: trunk/pisacd/cdmain.c
==============================================================================
--- trunk/pisacd/cdmain.c       Tue Nov  3 17:58:23 2009        (r1508)
+++ trunk/pisacd/cdmain.c       Tue Nov  3 18:09:08 2009        (r1509)
@@ -370,15 +370,9 @@
        /* Check, whether hipd is running. This is a requirement for
         * using pisacd. The output will be written to stderr before
         * pisacd is forking to background */
-       while (TRUE)
-       {
-               if (pisa_check_if_hipd_runs()) {
-                       break;
-               }
-               else {
-                       PISA_ERROR("hipd is not executed on this system. 
Waiting for it to start up...\n");
-                       sleep(WAIT_FOR_HIPD_TIMEOUT);
-               }
+       if (!pisa_check_if_hipd_runs()) {
+               PISA_ERROR("hipd is not executed on this system. Please start 
this first!\n");
+               exit(EXIT_FAILURE);
        }
 
        cd_perf_init();

Modified: trunk/pisasd/sdmain.c
==============================================================================
--- trunk/pisasd/sdmain.c       Tue Nov  3 17:58:23 2009        (r1508)
+++ trunk/pisasd/sdmain.c       Tue Nov  3 18:09:08 2009        (r1509)
@@ -381,7 +381,7 @@
        /* Check, whether hipd is running. This is a requirement for
         * using pisasd. The output will be written to stderr before
         * pisasd is forking to background */
-       if (pisa_check_if_hipd_runs()) {
+       if (!pisa_check_if_hipd_runs()) {
                PISA_ERROR("hipd is not executed on this system. Please start 
this first!\n");
                exit(EXIT_FAILURE);
        }

Other related posts:

  • » [pisa-src] r1509 - in trunk: pisacd/cdmain.c pisasd/sdmain.c - René Hummen