]> git.sur5r.net Git - bacula/bacula/commitdiff
Document SHA1 + work on returning child status
authorKern Sibbald <kern@sibbald.com>
Mon, 27 Jan 2003 20:54:02 +0000 (20:54 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 27 Jan 2003 20:54:02 +0000 (20:54 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@326 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/src/lib/bpipe.c
bacula/src/stored/acquire.c

index 3420d0843a178dccfd132dc7396f34e70a25b6eb..1257c5fb5eab638db94a8d9f6ba1bf00dc0454ad 100644 (file)
@@ -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().    
+
index 98478bc38051ce1622e70ab726ef8ba4b716ca9a..729d5e2a10e10f071da245d44b5299ea73ebe0bf 100644 (file)
@@ -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);
    }
index 42f7c1e2e36cd05e2e882e0ec6bcb59c2e6a8856..215e2b2fb3df5ebdd25967dedbbc9e86b1b3fec4 100644 (file)
@@ -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;
         }