Changeset 755


Ignore:
Timestamp:
Nov 29, 2012, 3:48:54 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.6: remove pid when exiting

Location:
trunk/server/source3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/source3/lib/pidfile.c

    r751 r755  
    4343        /* Add a suffix to the program name if this is a process with a
    4444         * none default configuration file name. */
     45        /* On OS/2, CONFIGFILE will always be different to dyn_CONFIGFILE
     46           as dyn_CONFIGFILE dynamically looks up the system ETC directory */   
     47#ifndef __OS2__
    4548        if (strcmp( CONFIGFILE, get_dyn_CONFIGFILE()) == 0) {
    4649                name = SMB_STRDUP(program_name);
     
    5962                }
    6063        }
     64#else
     65        name = SMB_STRDUP(program_name);
     66#endif
    6167
    6268        if (asprintf(&pidFile, "%s/%s.pid", lp_piddir(), name) == -1) {
  • trunk/server/source3/smbd/server_exit.c

    r754 r755  
    165165        printing_end();
    166166
    167 #ifdef __OS2__
    168         if (am_parent){
    169                 /* On OS/2 - we need to remove the PID file on server exit otherwise we may not be able to restart Samba */
    170                 char pidFile[1024];
    171                 slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_piddir(), "smbd");
    172                 unlink(pidFile);
    173         }
    174 #endif
    175 
    176167        if (how != SERVER_EXIT_NORMAL) {
    177168                DEBUGSEP(0);
Note: See TracChangeset for help on using the changeset viewer.