The Samba-Bugzilla – Attachment 780 Details for
Bug 2049
Samba daemon use a fixed pid file name schema
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Proposed fix
pidfile-suffix.diff (text/plain), 1.97 KB, created by
Lars Müller
on 2004-11-17 12:05:32 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Lars Müller
Created:
2004-11-17 12:05:32 UTC
Size:
1.97 KB
patch
obsolete
>Author: Lars Mueller <lmuelle at SuSE dot de> >Subject: Allow multiple Samba configurations on one machine to use the same > PIDDIR >Bugzilla: 48237, bugzilla.Samba.org #2049 > >Index: source/Makefile.in >=================================================================== >--- source/Makefile.in (revision 3810) >+++ source/Makefile.in (working copy) >@@ -782,6 +782,16 @@ > @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) @PICFLAGS@ -c $< -o $*.@PICSUFFIX@ > @BROKEN_CC@ -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.@PICSUFFIX@$$%.o%'` $@ > >+lib/pidfile.o: lib/pidfile.c >+ @echo Compiling $*.c >+ @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS1) -c $< -o $@ >+ >+lib/pidfile.@PICSUFFIX@: lib/pidfile.c >+ @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \ >+ dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi >+ @echo Compiling $*.c with @PICFLAGS@ >+ @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS1) @PICFLAGS@ -c $< -o $*.@PICSUFFIX@ >+ > lib/version.o: lib/version.c include/version.h > @echo Compiling $*.c > @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) -c $< -o $@ >Index: source/lib/pidfile.c >=================================================================== >--- source/lib/pidfile.c (revision 3810) >+++ source/lib/pidfile.c (working copy) >@@ -76,13 +76,24 @@ > } > > /* create a pid file in the pid directory. open it and leave it locked */ >-void pidfile_create(const char *name) >+void pidfile_create(const char *program_name) > { > int fd; > char buf[20]; >+ char *short_configfile; >+ pstring name; > pstring pidFile; > pid_t pid; > >+ /* Add a suffix to the program name if this is a process with a >+ * none default configuration file name. */ >+ if (strcmp( CONFIGFILE, dyn_CONFIGFILE) == 0) { >+ strncpy( name, program_name, sizeof( name)-1); >+ } else { >+ short_configfile = strrchr( dyn_CONFIGFILE, '/'); >+ slprintf( name, sizeof( name)-1, "%s-%s", program_name, short_configfile+1); >+ } >+ > slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_piddir(), name); > > pid = pidfile_pid(name);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2049
: 780