Priority:
For 1.39:
+- Add manpages to the list of directories for make install.
- If a job terminates, the DIR connection can close before the
Volume info is updated, leaving the File count wrong.
- Look at why SIGPIPE during connection can cause seg fault in
fn = get_pool_memory(PM_FNAME);
fn = edit_job_codes(jcr, fn, p, "");
bpipe = open_bpipe(fn, 0, "r");
- free_pool_memory(fn);
if (!bpipe) {
+ berrno be;
Jmsg(jcr, M_FATAL, 0, _("Cannot run program: %s. ERR=%s\n"),
- p, strerror(errno));
+ p, be.strerror());
+ free_pool_memory(fn);
return;
}
+ free_pool_memory(fn);
while (fgets(buf, sizeof(buf), bpipe->rfd)) {
strip_trailing_junk(buf);
fileset->incexe->name_list.append(bstrdup(buf));
}
if ((stat=close_bpipe(bpipe)) != 0) {
- Jmsg(jcr, M_FATAL, 0, _("Error running program: %s. RtnStat=%d ERR=%s\n"),
- p, stat, strerror(errno));
+ berrno be;
+ Jmsg(jcr, M_FATAL, 0, _("Error running program: %s. stat=%d: ERR=%s\n"),
+ p, be.code(stat), be.strerror(stat));
return;
}
break;
*
*/
/*
- Copyright (C) 2004-2005 Kern Sibbald
+ Copyright (C) 2004-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
return _("Unknown error during program execvp");
}
} else {
- Mmsg(&buf_, _("Child exited with code %d"), stat);
+ Mmsg(buf_, _("Child exited with code %d"), stat);
return buf_;
}
/* If we drop out here, berrno_ is set to an execvp errno */
}
if (berrno_ & b_errno_signal) {
stat = (berrno_ & ~b_errno_signal); /* remove bit */
- Mmsg(&buf_, _("Child died from signal %d: %s"), stat, get_signal_name(stat));
+ Mmsg(buf_, _("Child died from signal %d: %s"), stat, get_signal_name(stat));
return buf_;
}
#endif
*
*/
/*
- Copyright (C) 2004-2005 Kern Sibbald
+ Copyright (C) 2004-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
*/
+/*
+ * Extra bits set to interpret errno value differently from errno
+ */
#ifdef HAVE_WIN32
#define b_errno_win32 (1<<29) /* user reserved bit */
#endif
const char *strerror();
const char *strerror(int errnum);
void set_errno(int errnum);
+ int code() { return berrno_ & ~(b_errno_exit|b_errno_signal); }
+ int code(int stat) { return stat & ~(b_errno_exit|b_errno_signal); }
};
/* Constructor */
if (mode_write && pipe(writep) == -1) {
save_errno = errno;
free(bpipe);
- errno = save_errno;
free_pool_memory(tprog);
+ errno = save_errno;
return NULL;
}
if (mode_read && pipe(readp) == -1) {
close(writep[1]);
}
free(bpipe);
- errno = save_errno;
free_pool_memory(tprog);
+ errno = save_errno;
return NULL;
}
/* Start worker process */
close(readp[1]);
}
free(bpipe);
- errno = save_errno;
free_pool_memory(tprog);
+ errno = save_errno;
return NULL;
case 0: /* child */
#ifndef HAVE_WIN32
stat = WTERMSIG(chldstatus);
#else
-#warning "WTERMSIG undefined in Win32 !!!"
+ stat = 1; /* fake child status */
#endif
Dmsg1(800, "Child died from signal %d\n", stat);
stat |= b_errno_signal; /* exit signal returned */
stop_child_timer(bpipe->timer_id);
}
free(bpipe);
- Dmsg1(800, "returning stat = %d\n", stat);
+ Dmsg2(800, "returning stat=%d,%d\n", stat & ~(b_errno_exit|b_errno_signal), stat);
return stat;
}
free_pool_memory(ecmd);
if (bpipe == NULL) {
berrno be;
- Jmsg(jcr, M_FATAL, 0, _("%s could not execute. ERR=%s\n"), name,
+ Jmsg(jcr, M_FATAL, 0, _("Runscript: %s could not execute. ERR=%s\n"), name,
be.strerror());
return false;
}
status = close_bpipe(bpipe);
if (status != 0) {
berrno be;
- Jmsg(jcr, M_FATAL, 0, _("%s returned non-zero status=%d. ERR=%s\n"), name,
- status, be.strerror(status));
+ Jmsg(jcr, M_FATAL, 0, _("Runscript: %s returned non-zero status=%d. ERR=%s\n"), name,
+ be.code(status), be.strerror(status));
return false;
}
return true;
first = false;
continue;
}
+#ifdef HAVE_SUN_OS
+ if (dev_errno == EIO) {
+ Mmsg1(errmsg, _("No tape loaded or drive offline on %s.\n"), print_name());
+ return false;
+ }
+#else
if (dev_errno == EIO && i > 0) {
Dmsg0(200, "Sleeping 5 seconds.\n");
bmicrosleep(5, 0);
continue;
}
+#endif
Mmsg2(errmsg, _("Rewind error on %s. ERR=%s.\n"),
print_name(), be.strerror());
return false;
if (errno == ENOTTY || errno == ENOSYS) { /* Function not implemented */
switch (func) {
case -1:
- Emsg0(M_ABORT, 0, _("Got ENOTTY on read/write!\n"));
- break;
+ break; /* ignore message printed later */
case MTWEOF:
msg = "WTWEOF";
capabilities &= ~CAP_EOF; /* turn off feature */
*/
#undef VERSION
-#define VERSION "1.39.18"
-#define BDATE "04 August 2006"
-#define LSMDATE "04Aug06"
+#define VERSION "1.39.19"
+#define BDATE "07 August 2006"
+#define LSMDATE "07Aug06"
#define BYEAR "2006" /* year for copyright messages in progs */
/* Debug flags */
Technical notes on version 1.39
General:
+07Aug06
+kes Fix bug #462 incorrect error message printed when client script called
+ from File= was not found.
+kes Fix bug #558 (waiting for feedback) where Bacula needs too much time to
+ do a rewind on Solaris when no tape is in the drive (Solaris does not
+ have the detailed errno found on Linux). Added Solaris specific code.
+ Note, this may apply to other OSes as well.
06Aug06
kes Defined BUILDING_CATS in src/cats/cats.h so that *nix builds.
dsb Updated rpm spec for 1.39 - updatedb 9 to 10, add new man pages,