You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@gmail.com> on 2012/03/07 13:15:33 UTC
[PATCH] DefaultRuntimeDir, ap_runtime_dir_relative()
barely tested
--
Born in Roswell... married an alien...
Re: [PATCH] DefaultRuntimeDir, ap_runtime_dir_relative()
Posted by Jim Jagielski <ji...@jaguNET.com>.
Not sure how this changes things with the current impl... Certainly
collisions are possible using ServerRoot or the modules which use
DEFAULT_REL_RUNTIMEDIR already, right?
But yeah, I agree that noting this in the declaration
comments makes sense.
On Mar 7, 2012, at 3:33 PM, Rainer Jung wrote:
> Since a user can now easily move all those non-log read/write files to a central dir like /var/run/apache etc., do we think we need to keep the files themselves separate between instances by choosing unique file names (adding parent pid or similar)? Or should we document that you should *not* use the same directory for multiple instances?
>
> Although adding a pid to the file names seems simple, it often leads to accumulating garbage files.
>
> Regards,
>
> Rainer
>
Re: [PATCH] DefaultRuntimeDir, ap_runtime_dir_relative()
Posted by Igor Galić <i....@brainsware.org>.
----- Original Message -----
> Since a user can now easily move all those non-log read/write files
> to a
> central dir like /var/run/apache etc., do we think we need to keep
> the
> files themselves separate between instances by choosing unique file
> names (adding parent pid or similar)? Or should we document that you
> should *not* use the same directory for multiple instances?
>
> Although adding a pid to the file names seems simple, it often leads
> to
> accumulating garbage files.
No garbage please.
> Regards,
>
> Rainer
i
--
Igor Galić
Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE
Re: [PATCH] DefaultRuntimeDir, ap_runtime_dir_relative()
Posted by Rainer Jung <ra...@kippdata.de>.
Since a user can now easily move all those non-log read/write files to a
central dir like /var/run/apache etc., do we think we need to keep the
files themselves separate between instances by choosing unique file
names (adding parent pid or similar)? Or should we document that you
should *not* use the same directory for multiple instances?
Although adding a pid to the file names seems simple, it often leads to
accumulating garbage files.
Regards,
Rainer
Re: [PATCH] DefaultRuntimeDir, ap_runtime_dir_relative()
Posted by Jim Jagielski <ji...@jaguNET.com>.
+1 for inclusion in trunk for test/refining :)
/me loves CTR :)
On Mar 7, 2012, at 7:15 AM, Jeff Trawick wrote:
> barely tested
>
>
>
>
> --
> Born in Roswell... married an alien...
> <default_runtime_dir.txt>
Re: [PATCH] DefaultRuntimeDir, ap_runtime_dir_relative()
Posted by Jim Jagielski <ji...@apache.org>.
Hmmm...
I'm wondering why don't we do (in server/conf.c):
AP_DECLARE_DATA const char *ap_server_root = HTTPD_ROOT;
AP_DECLARE_DATA const char *ap_runtime_dir = DEFAULT_REL_RUNTIMEDIR;
Seems silly that we have never set these to the defaults...
This might be what's hitting you...
On Mar 7, 2012, at 7:17 AM, Jeff Trawick wrote:
> On Wed, Mar 7, 2012 at 7:15 AM, Jeff Trawick <tr...@gmail.com> wrote:
>> barely tested
>>
>
> seems to DTRT with this change to a test module, but more variations
> of ServerRoot/DefaultRuntimeDir need to be tried; I expect that
> ServerRoot must be set prior to DefaultRuntimeDir if declaring a path
> relative to ServerRoot
>
> static const char *set_flag(cmd_parms *cmd, void *dummy,
> int arg)
> {
> + fprintf(stderr, "my relative run-time file: >%s<\n",
> + ap_runtime_dir_relative(cmd->pool, "mod_test"));
> + fprintf(stderr, "my absolute run-time file: >%s<\n",
> + ap_runtime_dir_relative(cmd->pool, "/tmp/mod_test"));
> return NULL;
> }
>
Re: [PATCH] DefaultRuntimeDir, ap_runtime_dir_relative()
Posted by Jeff Trawick <tr...@gmail.com>.
On Wed, Mar 7, 2012 at 7:15 AM, Jeff Trawick <tr...@gmail.com> wrote:
> barely tested
>
seems to DTRT with this change to a test module, but more variations
of ServerRoot/DefaultRuntimeDir need to be tried; I expect that
ServerRoot must be set prior to DefaultRuntimeDir if declaring a path
relative to ServerRoot
static const char *set_flag(cmd_parms *cmd, void *dummy,
int arg)
{
+ fprintf(stderr, "my relative run-time file: >%s<\n",
+ ap_runtime_dir_relative(cmd->pool, "mod_test"));
+ fprintf(stderr, "my absolute run-time file: >%s<\n",
+ ap_runtime_dir_relative(cmd->pool, "/tmp/mod_test"));
return NULL;
}