Ignore:
Timestamp:
Jun 4, 2010, 3:11:43 PM (15 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: merged changes from 3.3

File:
1 edited

Legend:

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

    r414 r454  
    6868        }
    6969
     70#ifndef __OS2__ // if we lock the file, we won't be able to read it later on OS/2
    7071        if (fcntl_lock(fd,SMB_F_SETLK,0,1,F_RDLCK)) {
    7172                /* we could get the lock - it can't be a Samba process */
    7273                goto noproc;
    7374        }
     75#endif
    7476
    7577        SAFE_FREE(pidFile);
     
    9597        /* Add a suffix to the program name if this is a process with a
    9698         * none default configuration file name. */
     99
     100        /* On OS/2, CONFIGFILE will always be different to dyn_CONFIGFILE
     101           as dyn_CONFIGFILE dynamically looks up the system ETC directory */   
     102#ifndef __OS2__
     103
    97104        if (strcmp( CONFIGFILE, get_dyn_CONFIGFILE()) == 0) {
    98105                name = SMB_STRDUP(program_name);
     
    111118                }
    112119        }
     120#else
     121        name = SMB_STRDUP(program_name);
     122#endif
    113123
    114124        if (asprintf(&pidFile_name, "%s/%s.pid", lp_piddir(), name) == -1) {
     
    144154                exit(1);
    145155        }
     156
    146157        /* Leave pid file open & locked for the duration... */
    147158        SAFE_FREE(name);
     159#ifdef __OS2__ // If we leave the file open & locked on OS/2 - we can't read it, so close the fd
     160        close(fd);
     161#endif
    148162}
    149163
Note: See TracChangeset for help on using the changeset viewer.