httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sutton <>
Subject Re: Signalling an NT process.
Date Sun, 11 Jan 1998 17:16:04 GMT
On Sat, 10 Jan 1998, Ben Hyde wrote:
> This is all too weird.  I believe that it is impossible for user code
> to force a signal into a thread.  There are lots of mechanisms in NT
> that

You mean a signal() type signal? I don't think those are really very well
implemented in NT. MS seem to provide no way of doing an async interrupt. 
You have to poll or use a wait-on-an-event style to simulate interrupts. 

> So I'd propose having unblock_alarms poll to see if it should simulate
> a signal.  Then let "apache-signal" awaken the process from it's
> slumber,
> and finally use CreateRemoteThread, to fire a slightly higher priority
> thread inside the process that sets the globals that the signal
> simulation
> uses, or takes drastic action when that's required.     Bogus, you bet.

I'm sorry, I don't really understand what you mean. Are you trying to
implement a way of signalling a shutdown/restart? If so, I've already
described a way of doing that using a new thread in the parent process
(the main thread sits in an infinite wait for "apache-signal", which can
be used to wakeup this thread. All we have to figure out is how to signal
the second thread from a separate process. That could be by another event
for each type of signal). 

unblock_alarms() and friends are used within the working process -- the
one that creates the 40 worker threads -- and this process has nothing to
do with apache-signal. Threads are told to die by their "exit_event" (as
passed into them on the -c command line option). They then stick lots of
-1's into the job queue, so that they worker threads will exit as well. 

Does this not work, or did you mean something else? 


View raw message