Changeset 745 for trunk/server/source3/lib/pidfile.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/lib/pidfile.c
r454 r745 21 21 22 22 #include "includes.h" 23 #include "system/filesys.h" 23 24 24 25 #ifndef O_NONBLOCK … … 97 98 /* Add a suffix to the program name if this is a process with a 98 99 * none default configuration file name. */ 99 100 100 /* On OS/2, CONFIGFILE will always be different to dyn_CONFIGFILE 101 101 as dyn_CONFIGFILE dynamically looks up the system ETC directory */ 102 102 #ifndef __OS2__ 103 104 103 if (strcmp( CONFIGFILE, get_dyn_CONFIGFILE()) == 0) { 105 104 name = SMB_STRDUP(program_name); … … 154 153 exit(1); 155 154 } 156 157 155 /* Leave pid file open & locked for the duration... */ 158 156 SAFE_FREE(name); 157 159 158 #ifdef __OS2__ // If we leave the file open & locked on OS/2 - we can't read it, so close the fd 160 159 close(fd); 160 #else 161 /* set the close on exec so that we don't leak the fd */ 162 fcntl(fd, F_SETFD, FD_CLOEXEC); 161 163 #endif 162 164 }
Note:
See TracChangeset
for help on using the changeset viewer.