httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Finch <>
Subject Re: Apache/pthread and locking problem
Date Wed, 11 Aug 1999 19:33:34 GMT
Manoj Kasichainula <> wrote:
>With the current socket APIs available, we need some way for the
>processes to coordinate.

How about using a pipe for serialization? The threads inherit a
socketpair from the parent process which has a byte written to it at
startup. Before calling accept(), each thread does a blocking read
from the pipe; when it gets a byte it drops through accept() then
writes the byte back onto the pipe for another thread to read.

It could be flaky in the presence of crashes, though, if the byte gets

f.a.n.finch    e pluribus unix

View raw message