From: Kern Sibbald Date: Mon, 27 Jan 2003 20:54:02 +0000 (+0000) Subject: Document SHA1 + work on returning child status X-Git-Tag: Release-1.30~141 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=371d1362e703c29a2ca2a96876b6b4a257e4b30f;p=bacula%2Fbacula Document SHA1 + work on returning child status git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@326 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/kernstodo b/bacula/kernstodo index 3420d0843a..1257c5fb5e 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -16,11 +16,9 @@ Testing to do: (painful) For 1.30 release: - Add Signature type to File DB record. - - CD into subdirectory when open()ing files for backup to speed up things. Test with testfind(). - Add prefixlinks to where or not where absolute links to FD. -- Get correct error status from run_program or open_bpipe(). - Look at handling <> in smtp doesn't work with exim. - Priority job to go to top of list. - Implement Bar code handling @@ -30,7 +28,6 @@ For 1.30 release: - Why are save/restore of device different sizes (sparse?) Yup! Fix it. - Implement some way for the Console to dynamically create a job. - Restore to a particular time -- e.g. before date, after date. -- Implement SHA1 - Implement disk spooling - Implement finer multiprocessing options. - Solaris -I on tar for include list @@ -827,3 +824,7 @@ Done: (see kernsdone for more) - Set timeout on opening fifo for save or restore (findlib) - Document FIFO storage device. - Document fifo and | and < +====== 1.30 ======= +- Implement SHA1 +- Get correct error status from run_program or open_bpipe(). + diff --git a/bacula/src/lib/bpipe.c b/bacula/src/lib/bpipe.c index 98478bc380..729d5e2a10 100644 --- a/bacula/src/lib/bpipe.c +++ b/bacula/src/lib/bpipe.c @@ -166,17 +166,22 @@ int close_bpipe(BPIPE *bpipe) sleep(1); /* wait one second */ remaining_wait--; } else { - stat = ETIME; /* set timeout, if no other status */ + stat = 1; /* set error status */ + errno = ETIME; /* set timed out */ wpid = -1; break; /* don't wait any longer */ } } - if (wpid != -1 && WIFEXITED(chldstatus)) { - stat = WEXITSTATUS(chldstatus); + if (wpid > 0) { + if (WIFEXITED(chldstatus)) { /* process exit()ed */ + stat = WEXITSTATUS(chldstatus); + } else if (WIFSIGNALED(chldstatus)) { /* process died */ + stat = 1; + } if (stat != 0) { - errno = ECHILD; + errno = ECHILD; /* set child errno */ } - } + } if (bpipe->timer_id) { stop_child_timer(bpipe->timer_id); } diff --git a/bacula/src/stored/acquire.c b/bacula/src/stored/acquire.c index 42f7c1e2e3..215e2b2fb3 100644 --- a/bacula/src/stored/acquire.c +++ b/bacula/src/stored/acquire.c @@ -173,6 +173,12 @@ int acquire_device_for_append(JCR *jcr, DEVICE *dev, DEV_BLOCK *block) !(dir_find_next_appendable_volume(jcr) && strcmp(dev->VolHdr.VolName, jcr->VolumeName) == 0)) { /* wrong tape mounted */ if (dev->num_writers != 0) { + /* + * ***FIXME*** add multiple writers here if permitted + * find end of dev chain + * dev->next = init_dev(NULL, dev->device); + * ... + */ Jmsg(jcr, M_FATAL, 0, _("Device %s is busy writing on another Volume.\n"), dev_name(dev)); goto get_out; }