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

Location:
trunk/server/source3/nmbd
Files:
2 edited

Legend:

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

    r745 r854  
    170170        CatchSignal(SIGTERM, sig_term);
    171171
     172#ifdef __OS2__
     173        /* restore the logfile to log.nmbd always */
     174        char *lfile = NULL;
     175        if (asprintf(&lfile, "%s/log%d.nmbd", get_dyn_LOGFILEBASE(), getpid()) < 0)
     176                exit(1);
     177
     178        lp_set_logfile(lfile);
     179        SAFE_FREE(lfile);
     180        reopen_logs();
     181#endif
    172182        status = reinit_after_fork(nmbd_messaging_context(),
    173183                                   nmbd_event_context(),
  • 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.