From: Kern Sibbald Date: Sun, 21 May 2006 08:56:15 +0000 (+0000) Subject: - Move DIR run command to SD before starting the message thread X-Git-Tag: Release-7.0.0~7974 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=70d023b17bb36e8ca4331b9900a199350ea7ed08;p=bacula%2Fbacula - Move DIR run command to SD before starting the message thread as suggested by Cristopher Hull to avoid a race deadlock from two threads using the bsock structure. - Modify LICENSE to correct some problems pointed out by Debian. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3026 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/LICENSE b/bacula/LICENSE index d0b2ced278..7b65ee5474 100644 --- a/bacula/LICENSE +++ b/bacula/LICENSE @@ -7,7 +7,7 @@ License: For the most part, Bacula is licensed under the GPL version 2 and any code that is Copyright Kern Sibbald and John Walker or Copyright Kern Sibbald (after November 2004) with the GPL -indication is so licensed, but with the following five additions: +indication is so licensed, but with the following four additions: Linking: Bacula may be linked with any libraries permitted under the GPL, @@ -16,19 +16,6 @@ required for its proper functioning, providing the source code of those non-GPLed libraries is non-proprietary and freely available to the public. -Termination for IP or Patent Action: -In addition to the termination clause specified in the GPL, this -license shall terminate automatically and you may no longer -exercise any of the rights granted to you by this license as of -the date you commence an action, including a cross-claim or -counterclaim, against any licensor of GPL software alleging that -the software infringes an intellectual property right or a -patent. Special dispensation from or delay to the execution of -this clause may be possible by applying directly to the license -owner of this software. Such a dispensation or delay is valid -only in writing and signed by the one or more of the license -holders. - IP rights: Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are @@ -54,42 +41,45 @@ Code falling under the above conditions will be marked as follows: Copyright (C) 2000-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 as - published by the Free Software Foundation; either version 2 of - the License. + modify it under the terms of the GNU General Public License + version 2 as amended with additional clauses defined in the + file LICENSE in the main source directory. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + the file LICENSE for additional details. - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA. Windows: Certain source code used to build the Windows version of the Bacula File daemon is copyrighted and or trademarked by Microsoft and may contain Microsoft intellectual property (examples: Microsoft VC++, the source to the VSS libraries, the Microsoft C runtime libraries). As -such we cannot and do not distribute that software. The compiler is -available for purchase, and Microsoft provides a free version of the -compiler. The source code and libraries are available for download from -Microsoft public Web servers. We have documented in the src/win32 -directory how we build the Windows File daemon and many users have -succeeded in doing so themselves. Our intention is to respect as -closely as possible Open Source practices while maintaining full -respect for proprietary and copyrighted code. +such we cannot and do not distribute that software. We are permitted +however to distribute Bacula in binary form with the necessary Microsoft +libraries linked in. + +You may obtain the parts that we cannot distribute as follows. The +Microsoft compiler available for purchase, and Microsoft provides a free +version of the compiler. The source code and libraries are available for +download from Microsoft public Web servers. We have documented in the +src/win32 directory the URLs from which we obtained the library source, and +how we build the Windows File daemon and many users have succeeded in doing +so themselves. Our intention is to respect as closely as possible Open +Source practices while maintaining full respect for proprietary and +copyrighted code. ===================================== The entire GPL is reproduced in the manuals distributed with the Bacula documentation and can also be found online on the GNU web site -as well as at www.bacula.org. +as well as at www.bacula.org. You may also obtain a copy of the +GPL (or LGPL) by writing to: Free Software Foundation, Inc., +51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Certain parts of the Bacula software are licensed by their -copyright holder(s) undert the GPL with no modifications. These +copyright holder(s) under the GPL with no modifications. These software files are clearly marked as such. There are parts of Bacula that are licensed under the LGPL so diff --git a/bacula/kes-1.39 b/bacula/kes-1.39 index 8c877d0ad6..de17014606 100644 --- a/bacula/kes-1.39 +++ b/bacula/kes-1.39 @@ -2,6 +2,11 @@ Kern Sibbald General: +21May06 +- Move DIR "run" command to SD before starting the message thread + as suggested by Cristopher Hull to avoid a race deadlock from + two threads using the bsock structure. +- Modify LICENSE to correct some problems pointed out by Debian. 05May06 - Correct EOF with no \n lex.c problem. - Tweak compat.h compat.cpp and merge with apcupsd diff --git a/bacula/src/dird/backup.c b/bacula/src/dird/backup.c index 9ba0ee4bdd..dc889976ec 100644 --- a/bacula/src/dird/backup.c +++ b/bacula/src/dird/backup.c @@ -158,6 +158,16 @@ bool do_backup(JCR *jcr) if (!start_storage_daemon_job(jcr, NULL, jcr->storage)) { return false; } + + /* + * Start the job prior to starting the message thread below + * to avoid two threads from using the BSOCK structure at + * the same time. + */ + if (!bnet_fsend(jcr->store_bsock, "run")) { + return false; + } + /* * Now start a Storage daemon message thread. Note, * this thread is used to provide the catalog services @@ -169,10 +179,6 @@ bool do_backup(JCR *jcr) } Dmsg0(150, "Storage daemon connection OK\n"); - if (!bnet_fsend(jcr->store_bsock, "run")) { - goto bail_out; - } - set_jcr_job_status(jcr, JS_WaitFD); if (!connect_to_file_daemon(jcr, 10, FDConnectTimeout, 1)) { goto bail_out; diff --git a/bacula/src/lib/btimers.h b/bacula/src/lib/btimers.h index f529784e79..de7328b770 100644 --- a/bacula/src/lib/btimers.h +++ b/bacula/src/lib/btimers.h @@ -5,32 +5,27 @@ * */ /* - Copyright (C) 2003-2004 Kern Sibbald and John Walker + Copyright (C) 2000-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 as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. + modify it under the terms of the GNU General Public License + version 2 as amended with additional clauses defined in the + file LICENSE in the main source directory. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + the file LICENSE for additional details. */ typedef struct s_btimer_t { - watchdog_t *wd; /* Parent watchdog */ + watchdog_t *wd; /* Parent watchdog */ int type; bool killed; - pid_t pid; /* process id if TYPE_CHILD */ - pthread_t tid; /* thread id if TYPE_PTHREAD */ - BSOCK *bsock; /* Pointer to BSOCK */ + pid_t pid; /* process id if TYPE_CHILD */ + pthread_t tid; /* thread id if TYPE_PTHREAD */ + BSOCK *bsock; /* Pointer to BSOCK */ } btimer_t; /* EOF */ diff --git a/bacula/src/version.h b/bacula/src/version.h index a2e8c6ab9e..360fe015fc 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -3,9 +3,9 @@ */ #undef VERSION -#define VERSION "1.39.10" -#define BDATE "05 May 2006" -#define LSMDATE "05May06" +#define VERSION "1.39.11" +#define BDATE "21 May 2006" +#define LSMDATE "21May06" /* Debug flags */ #undef DEBUG