httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Noordhuis <i...@bnoordhuis.nl>
Subject Re: mod_sflow
Date Sun, 09 Jan 2011 20:17:29 GMT
On Sat, Jan 8, 2011 at 00:06, Neil McKee <neil.mckee@inmon.com> wrote:
> This module is designed to work in both "prefork" and "worker" models.  I would really
> appreciate it if someone could review the design to make sure I made appropriate choices
> about where to use pipes, shared-memory, mutex locking,  and so on(!)   These choices
> are documented in the comment at the top of the mod_sflow.c file,  here:
> http://code.google.com/p/mod-sflow/source/browse/trunk/mod_sflow.c?r=14

Neil, two points of critique:

1. You are doing way too much in your critical section, including
potentially blocking actions like logging.

2. Assuming it's safe to write up to 4K to the pipe is dangerous for
several reasons: PIPE_BUF may be < 4096, the pipe may not be empty,
etc. This ties in with #1 since you are doing it from within the
critical section.

Mime
View raw message