also fixed a trivial memory leak.
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#define RCSID "$Id: main.c,v 1.108 2001/12/14 02:51:34 mostrows Exp $"
+#define RCSID "$Id: main.c,v 1.109 2002/01/11 18:10:16 etbe Exp $"
#include <stdio.h>
#include <ctype.h>
#include <stdio.h>
#include <ctype.h>
(chp? chp->prog: "??"), pid, WTERMSIG(status));
} else if (debug)
dbglog("Script %s finished (pid %d), status = 0x%x",
(chp? chp->prog: "??"), pid, WTERMSIG(status));
} else if (debug)
dbglog("Script %s finished (pid %d), status = 0x%x",
- (chp? chp->prog: "??"), pid, status);
+ (chp? chp->prog: "??"), pid,
+ WIFEXITED(status) ? WEXITSTATUS(status) : status);
if (chp && chp->done)
(*chp->done)(chp->arg);
if (chp)
if (chp && chp->done)
(*chp->done)(chp->arg);
if (chp)
if (tdb_store(pppdb, key, dbuf, TDB_REPLACE))
error("tdb_store failed: %s", tdb_error(pppdb));
if (tdb_store(pppdb, key, dbuf, TDB_REPLACE))
error("tdb_store failed: %s", tdb_error(pppdb));
+ if (vbuf)
+ free(vbuf);
+