httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 51285] [PATCH] rotatelogs: Add -p option to call arbitrary post-rotate program
Date Sat, 18 Jun 2011 15:59:16 GMT

--- Comment #8 from Joe Orton <> 2011-06-18 15:59:16 UTC ---
Sorry that I never followed up before.

I've attached a patch which has some simplification in:

1) it is necessary to wait() for the forked children at some point, otherwise
we'd collect an ever-increasing horde of zombies (defunct processes).  What
I've tried here is: 

a) not using detached processes
b) do just "fire and forget"
c) collect any zombies before each new post-rotate

We could still log the exitcode/reason when collecting the zombies I guess, for
diagnostics... not sure.

2) using the tokenize does seem more work than necessary, e.g. if the log
filenames had spaces in we'd need to quote to get tokenize to work.  have
switched to set up argv[] directly

3) seems simpler to drop the env vars completely; if the spawned process wants
to use env vars it can do that based on argv

What do you think?  It seems to work from some brief testing, particularly with
a post-rotate program which just does "sleep".  I'd be happy to commit as-is;
more review/testing would be great.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message