From a61977dcfe003225553ae69f296c8343b8d80b39 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 20 Jun 2004 20:16:58 +0000 Subject: [PATCH] Misc updates git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1432 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kernstodo | 11 +++++++---- bacula/src/console/console_conf.c | 4 ++-- bacula/src/lib/signal.c | 12 ++---------- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/bacula/kernstodo b/bacula/kernstodo index c7de681b1b..191b94ec60 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -1,10 +1,16 @@ Kern's ToDo List - 10 June 2004 + 20 June 2004 1.35 Items to do: - Implement SIGHUP in Dir (Implement resources on a single pointer) +- Make btape release the drive during the "test" append. - Do tape alerts -- see tapealert.txt +- Revisit and revise Disaster Recovery (fix SCSI and RAID + disk detection) +- Document a get out of jail procedure if everything breaks if + you lost/broke the Catalog -- do the same for "I know my + file is there how do I get it back?". - When restore started from console, report jobid. - Win32 inc problem when new directory added. - On Win95 @@ -62,8 +68,6 @@ Wish list: - Add priority to Scheduled jobs status listing. - Add multiple-media-types.txt - look at mxt-changer.html -- Document a get out of jail procedure if everything breaks if you lost/broke - the Catalog. - Make ? do a help command (no return needed). - Implement restore directory. - Add All Local Partitions = yes to new style saves. @@ -1078,4 +1082,3 @@ Block Position: 0 - Implement fast tree insert (doubly linked list?) - Disallow using Internal database - Feedback while the tree is being built. - diff --git a/bacula/src/console/console_conf.c b/bacula/src/console/console_conf.c index 6fbfbe75d3..9ae6cad4f9 100644 --- a/bacula/src/console/console_conf.c +++ b/bacula/src/console/console_conf.c @@ -109,7 +109,7 @@ RES_TABLE resources[] = { void dump_resource(int type, RES *reshdr, void sendit(void *sock, const char *fmt, ...), void *sock) { URES *res = (URES *)reshdr; - int recurse = 1; + bool recurse = true; if (res == NULL) { printf("No record for %d %s\n", type, res_to_str(type)); @@ -117,7 +117,7 @@ void dump_resource(int type, RES *reshdr, void sendit(void *sock, const char *fm } if (type < 0) { /* no recursion */ type = - type; - recurse = 0; + recurse = false; } switch (type) { case R_CONSOLE: diff --git a/bacula/src/lib/signal.c b/bacula/src/lib/signal.c index c9216ac926..74091e75c1 100644 --- a/bacula/src/lib/signal.c +++ b/bacula/src/lib/signal.c @@ -58,24 +58,16 @@ static pid_t main_pid = 0; /* * Handle signals here */ -extern "C" { - static void signal_handler(int sig); -} - -static void signal_handler(int sig) +extern "C" void signal_handler(int sig) { static int already_dead = 0; /* If we come back more than once, get out fast! */ - if (already_dead > 1) { - exit(1); - } - /* If we come back once, take normal exit */ if (already_dead) { exit(1); } Dmsg2(200, "sig=%d %s\n", sig, sig_names[sig]); - /* Ignore certain signals */ + /* Ignore certain signals -- SIGUSR2 used to interrupt threads */ if (sig == SIGCHLD || sig == SIGUSR2) { return; } -- 2.39.5