]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/bpipe.c
Fix get_basename() -- rewrite
[bacula/bacula] / bacula / src / lib / bpipe.c
index 89917741953d020c6c2d17347191704df8845f79..ad2e7ad36d0382b7983de9fb488cbb4511fd732a 100644 (file)
@@ -1,12 +1,12 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2002-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2002-2011 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
@@ -15,7 +15,7 @@
    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
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
@@ -30,7 +30,6 @@
  *
  *    Kern Sibbald, November MMII
  *
- *   Version $Id$
  */
 
 
@@ -135,7 +134,8 @@ BPIPE *open_bpipe(char *prog, int wait, const char *mode)
          dup2(readp[1], 1);           /* dup our read to his stdout */
          dup2(readp[1], 2);           /*   and his stderr */
       }
-      closelog();                     /* close syslog if open */
+/* Note, the close log cause problems, see bug #1536 */
+/*    closelog();                        close syslog if open */
       for (i=3; i<=32; i++) {         /* close any open file descriptors */
          close(i);
       }
@@ -394,7 +394,7 @@ int run_program_full_output(char *prog, int wait, POOLMEM *&results)
    const int bufsize = 32000;
 
    
-   sm_check(__FILE__, __LINE__, false);
+   Dsm_check(200);
 
    tmp = get_pool_memory(PM_MESSAGE);
    buf = (char *)malloc(bufsize+1);
@@ -407,7 +407,7 @@ int run_program_full_output(char *prog, int wait, POOLMEM *&results)
       goto bail_out;
    }
    
-   sm_check(__FILE__, __LINE__, false);
+   Dsm_check(200);
    tmp[0] = 0;
    while (1) {
       buf[0] = 0;