On Tue, 18 Mar 2008 08:53:29 -0400
"Sam Carleton" <scarleton@miltonstreet.com> wrote:
> On Sun, Mar 16, 2008 at 6:43 PM, ed <ed-http@s5h.net> wrote:
>
> > What might be better for you is to add this to a queue, perhaps via
> > means of a unix socket (or IP socket) of another process, that
> > does this work.
>
> Actually today the program is only Windows and in time will be
> Windows, Linux and OSX (aka BSD). After posting I had a feeling that
> a daemon (Windows NT Service) would be the most likely approach. The
> only remaining question is: How best to let the daemon process know
> it is time to grab the task from Apache. In Windows there are named
> Event Object
> (http://msdn2.microsoft.com/en-us/library/ms682655(VS.85).aspx) so
> the Apache Server can set the event and the daemon know it needs to
> get the new task from Apache. Does the Linux/BSD world have
> something like named Events?
Linux IPC is sockets, semaphores and pipes.
Personally, using the filesystem might be portable enough for you.
Leave a file in /tmp/apache_messagenam_pid.tmp. Once the file writing is
complete, move the file to /tmp/apache_messagenam_pid so your collector
program can read the full message.
This doesn't require sockets or anything that should make portability a
problem.
--
The GameCube is errored because of a translator who
speaks Bocce. R2D2 is having Robert Mann to write some scripts.
:: http://www.s5h.net/ :: http://www.s5h.net/gpg.html
|