Ignore:
Timestamp:
Feb 24, 2014, 3:48:58 PM (11 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.6: seperate logfiles per pid in nmbd

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/source3/nmbd/nmbd.c

    r845 r854  
    398398#ifdef __OS2__
    399399        /* restore the logfile to log.nmbd always */
    400                 char *lfile = NULL;
    401                 if (asprintf(&lfile, "%s/log.nmbd", get_dyn_LOGFILEBASE()) < 0) {
    402                         exit(1);
    403                 }
    404                 lp_set_logfile(lfile);
    405                 SAFE_FREE(lfile);
     400        char *lfile = NULL;
     401        if (asprintf(&lfile, "%s/log%d.nmbd", get_dyn_LOGFILEBASE(), getpid()) < 0)
     402                exit(1);
     403
     404        lp_set_logfile(lfile);
     405        SAFE_FREE(lfile);
    406406#endif
    407407        return(ret);
     
    841841        if (!override_logfile) {
    842842                char *lfile = NULL;
    843                 if (asprintf(&lfile, "%s/log.nmbd", get_dyn_LOGFILEBASE()) < 0) {
     843                if (asprintf(&lfile, "%s/log%d.nmbd", get_dyn_LOGFILEBASE(), getpid()) < 0) {
    844844                        exit(1);
    845845                }
Note: See TracChangeset for help on using the changeset viewer.