]> git.sur5r.net Git - bacula/bacula/commitdiff
Tweak daemon.c berrno, copyright.
authorKern Sibbald <kern@sibbald.com>
Tue, 20 Sep 2005 12:36:00 +0000 (12:36 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 20 Sep 2005 12:36:00 +0000 (12:36 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2399 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/kes-1.37
bacula/src/lib/daemon.c
bacula/src/version.h

index c30214aefbf2cc77de4569776f8294099e55931a..63aeb67e3e70df358bde91214e0dcc2083ff27ba 100644 (file)
@@ -11,6 +11,7 @@ Final items for 1.37 before release:
 1. Fix bugs
 - Look at fixing restore status stats in SD.
 - Mount after manually unloading changer causes hang in SD
+- Close STDOUT if debug_level == 0
 - Check if ANSI tape labeling works with drive in
   read-only mode.
    > > btape: label.c:299 write_volume_label()
index 1deda0081c2e9b988296113095b370cb5ae9ec9c..f38aaae9f4a2f982769689efa459ed1117bc2d43 100644 (file)
@@ -4,6 +4,8 @@
 General:
 
 Changes to 1.37.39:
+20Sep05
+- Tweak daemon.c berrno, copyright.
 19Sep05
 - Fix handling of temp file in mtx_changer.in, reported as
   a security bug, but it is not really.  Bug #422
index 55ce00b6bceda5681ab24f4fc4431a0ec0fe63dc..871a25e169c1ec4dd6d3adc7227c3795e3ea6031 100644 (file)
  * any terminal processes.
  *
  */
-
 /*
-   Copyright (C) 2000-2004 Kern Sibbald and John Walker
+   Copyright (C) 2000-2005 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.
 
  */
 
@@ -54,10 +48,12 @@ daemon_start()
     */
 
    Dmsg0(900, "Enter daemon_start\n");
-   if ( (cpid = fork() ) < 0)
-      Emsg1(M_ABORT, 0, _("Cannot fork to become daemon: %s\n"), strerror(errno));
-   else if (cpid > 0)
-      exit(0);             /* parent exits */
+   if ( (cpid = fork() ) < 0) {
+      berrno be;
+      Emsg1(M_ABORT, 0, _("Cannot fork to become daemon: %s\n"), be.strerror());
+   } else if (cpid > 0) {
+      exit(0);              /* parent exits */
+   }
    /* Child continues */
 
    setsid();
@@ -101,7 +97,7 @@ daemon_start()
       close(fd);
    } else {
       for(i=1; fd + i <= 2; i++) {
-        dup2(fd, fd+i);
+         dup2(fd, fd+i);
       }
    }
 
index ce9c0a45844b175bfe4fb2c9c8d35fcdd83e7989..5d8d3a1a93a600fa0f18c4761351444778bc0435 100644 (file)
@@ -4,8 +4,8 @@
 
 #undef  VERSION
 #define VERSION "1.37.39"
-#define BDATE   "19 September 2005"
-#define LSMDATE "19Sep05"
+#define BDATE   "20 September 2005"
+#define LSMDATE "20Sep05"
 
 /* Debug flags */
 #undef  DEBUG