You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Andrew Wilson <aw...@hyperreal.com> on 1995/12/12 13:20:41 UTC
Patch to move htstatus file from /tmp to logs/ (fwd)
Ack sent: 1.1.0 will have a conf file directive for placing the
htstatus file (or words to that effect). Why is the parent server
writing multiple entries?
Ay.
Forwarded message:
> From snewton@oac.hsc.uth.tmc.edu Mon Dec 11 10:00:47 1995
> Message-Id: <19...@taz.hyperreal.com>
> X-Sender: snewton@oac3.hsc.uth.tmc.edu.
> X-Mailer: Windows Eudora Pro Version 2.1.2
> Mime-Version: 1.0
> Content-Type: text/plain; charset="us-ascii"
> Date: Mon, 11 Dec 1995 12:01:56 -0600
> To: apache-bugs@mail.apache.org
> From: "Steven E. Newton" <sn...@oac.hsc.uth.tmc.edu>
> Subject: Patch to move htstatus file from /tmp to logs/
>
> Hi.
>
> I found a little glitch in 1.0.0 with the htstatus file. Our /tmp directory
> cleaning script deleted the hstatus.XXXXXX file. It turned out that when it
> did this the server, naturally unable to access the scoreboard, started a
> new process for each connection until our process table filled up. Of
> course we changed our script but the long term change is to move the status
> file from /tmp to, I think, the logs subdirectory of the server_root.
> Attached is some diffs to do just that. Please let me know what you think.
>
> I noticed another glitch which I'm not sure how to fix, though. It appears
> that the parent server is writing multiple entries for its own PID marked as
> SERVER_DEAD. I am not sure where this is happening.
>
> s
>
> --- snip snip ---
> *** http_main.orig Wed Nov 22 09:37:44 1995
> --- http_main.c Mon Dec 11 11:59:23 1995
> ***************
> *** 324,330 ****
> */
>
> static short_score scoreboard_image[HARD_SERVER_MAX];
> ! static char scoreboard_fname[] = "/tmp/htstatus.XXXXXX";
> static int have_scoreboard_fname = 0;
> static int scoreboard_fd;
>
> --- 324,330 ----
> */
>
> static short_score scoreboard_image[HARD_SERVER_MAX];
> ! static char *scoreboard_fname;
> static int have_scoreboard_fname = 0;
> static int scoreboard_fd;
>
> ***************
> *** 360,365 ****
> --- 360,367 ----
>
> void reinit_scoreboard (pool *p)
> {
> + scoreboard_fname = (static char *)palloc(p, strlen(server_root) + 22);
> + sprintf (scoreboard_fname, "%s/logs/htstatus.XXXXXX", server_root);
> if (!have_scoreboard_fname && (mktemp(scoreboard_fname) == NULL ||
> scoreboard_fname[0] == '\0')) {
> fprintf (stderr, "Cannot assign name to scoreboard file!\n");
> --- snip snip ---
>
> --
> + + + + + | snewton@oac.hsc.uth.tmc.edu
> | Nobody else speaks for me,
> They've given you a number | and I speak for no one else.
> and taken away your name. |http://oac11.hsc.uth.tmc.edu/index.html
> | + + + + + +
>
>
>