You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Michael Douglass <mi...@texas.net> on 1997/11/15 01:22:56 UTC

Question on a patch I want to do....

Humor me, and tell me that this will do what I want to do:

Given this code:

static void expand_lock_fname(pool *p)
{
    char buf[20];

    ap_snprintf( buf, sizeof(buf), ".%u", getpid() );
    lock_fname = pstrcat (p, server_root_relative (p, lock_fname), buf, NULL);
}

If I change the last line to:
    lock_fname = pstrcat (p, "/usr/local/locks/apache, buf, NULL);

It will make the lockfile name /usr/local/locsk/apache.pid, right?

-- 
Michael Douglass
Texas Networking, Inc.

 "The past is a foreign country; they do things differently there."
      L. P. Hartley, British author. The Go-Between, Prologue (1953).

Re: Question on a patch I want to do....

Posted by Michael Douglass <mi...@texas.net>.
On Fri, Nov 14, 1997 at 04:26:49PM -0800, Dean Gaudet said:
> Yeah, but why don't you just set the LockFile directive?  Or is that why
> you're saying "humor me" ? 

No, the humor me part was it's 7:00pm... I'm tired, want to go home, and
figured the humiliation of asking this question was worth it...   *shrug*
So maybe, I'm humoring you by making a fool of myself. :)

> 
> Dean
> 
> On Fri, 14 Nov 1997, Michael Douglass wrote:
> 
> > 
> > Humor me, and tell me that this will do what I want to do:
> > 
> > Given this code:
> > 
> > static void expand_lock_fname(pool *p)
> > {
> >     char buf[20];
> > 
> >     ap_snprintf( buf, sizeof(buf), ".%u", getpid() );
> >     lock_fname = pstrcat (p, server_root_relative (p, lock_fname), buf, NULL);
> > }
> > 
> > If I change the last line to:
> >     lock_fname = pstrcat (p, "/usr/local/locks/apache, buf, NULL);
> > 
> > It will make the lockfile name /usr/local/locsk/apache.pid, right?
> > 
> > -- 
> > Michael Douglass
> > Texas Networking, Inc.
> > 
> >  "The past is a foreign country; they do things differently there."
> >       L. P. Hartley, British author. The Go-Between, Prologue (1953).
> > 

-- 
Michael Douglass
Texas Networking, Inc.

 "The past is a foreign country; they do things differently there."
      L. P. Hartley, British author. The Go-Between, Prologue (1953).

Re: Question on a patch I want to do....

Posted by Dean Gaudet <dg...@arctic.org>.
Yeah, but why don't you just set the LockFile directive?  Or is that why
you're saying "humor me" ? 

Dean

On Fri, 14 Nov 1997, Michael Douglass wrote:

> 
> Humor me, and tell me that this will do what I want to do:
> 
> Given this code:
> 
> static void expand_lock_fname(pool *p)
> {
>     char buf[20];
> 
>     ap_snprintf( buf, sizeof(buf), ".%u", getpid() );
>     lock_fname = pstrcat (p, server_root_relative (p, lock_fname), buf, NULL);
> }
> 
> If I change the last line to:
>     lock_fname = pstrcat (p, "/usr/local/locks/apache, buf, NULL);
> 
> It will make the lockfile name /usr/local/locsk/apache.pid, right?
> 
> -- 
> Michael Douglass
> Texas Networking, Inc.
> 
>  "The past is a foreign country; they do things differently there."
>       L. P. Hartley, British author. The Go-Between, Prologue (1953).
>