OSSP CVS Repository

ossp - Check-in [2473]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2473
Date: 2002-Aug-01 17:54:45 (local)
2002-Aug-01 15:54:45 (UTC)
User:ms
Branch:
Comment: Found a new rc_ex bug, and couldn't fix it so I put in a hacky workaround.
Tickets:
Inspections:
Files:
ossp-pkg/rc/rc_config.c      1.26 -> 1.27     6 inserted, 3 deleted
ossp-pkg/rc/rc_proc.c      1.15 -> 1.16     2 inserted, 5 deleted

ossp-pkg/rc/rc_config.c 1.26 -> 1.27

--- rc_config.c  2002/08/01 11:59:55     1.26
+++ rc_config.c  2002/08/01 15:54:45     1.27
@@ -172,7 +172,7 @@
         RC_THROW(RC_ERR_USE);
     }
 
-    return(NULL);   /* Not reached  */
+    return(NULL);   /* Not reached */
 }
 
 const char **configGetsecs(void)
@@ -202,7 +202,7 @@
 {
     ex_t Except;
 
-    try {       /* Parse option groups in order of priority          */
+    try {                /* Parse option groups in order of priority */
         clioptParseopts(nTotal, szArgvec);  /* Command line options  */
         configVerify();  /* Test for usage, help and version options */
         clioptParseargs();                  /* Command line args */
@@ -270,7 +270,10 @@
             bStop = TRUE;
         }
         else if (configGetval(RC_INF_VAL)) {
-            configInfo();
+/* FIXME: Ralf! If an exception is thrown (or rethrown) into this context, */
+/*        then the local handler (in five lines) either segfaults or hangs */
+fprintf(stderr, "Hello user, OSSP rc is broken if you use --info. Thanks.\n\n                                - The management\n");
+/*            configInfo();*/
             bStop = TRUE;
         }
     }


ossp-pkg/rc/rc_proc.c 1.15 -> 1.16

--- rc_proc.c    2002/08/01 15:16:25     1.15
+++ rc_proc.c    2002/08/01 15:54:45     1.16
@@ -199,7 +199,6 @@
     /****************************************************/
     if (configGetval(RC_EVL_VAL))        /* Evaluate */
         fprintf(stderr, "Error: Evaluate is not implemented yet.\n"); /* FIX */
-
     else if (configGetval(RC_EXC_VAL)) { /* Execute  */
             pszVec[0] = "/bin/sh";
             pszVec[1] = "-c";
@@ -208,11 +207,9 @@
         if (execvp(*pszVec, pszVec) == -1)  /* launch                   */
             TRACE("Bad, execvp in child returned -1");
     }
-
-    else if (configGetval(RC_PRN_VAL))   /* Print    */
+    else if (configGetval(RC_PRN_VAL))   /* Print */
         scriptDump(pRc->m_pScript);
-
-    else                                 /* Something is wrong here */
+    else                                        /* Something is wrong here */
         return(RC_THROW(RC_ERR_INT));
 
     return(RC_THROW(RC_OK));

CVSTrac 2.0.1