httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Wortham" <>
Subject Data Structure Serialization
Date Thu, 02 Nov 2006 19:07:31 GMT
I'd like to know if anyone developing modules has run across a
struct-serialization function/library (in C, preferrably well tested with
the APR and multiple (file|operating) systems).  I am attempting to share
data across child processes, but I have a few bugs in my serialization
code.  I'm really just looking for code that creates a buffer string from a
struct and vice versa, but if it writes/reads to a file - all the better!  I
looked into the APR Shared Memory funtions, but it seems that developers can
not agree that the shared memory library is well supported, hence my desire
to write my own workaround.

Also, I am having problems opening a new file.  Perhaps there is a limit to
the number of files allowed to be opened from the same pool or the same
I have one file that opens in a given function.  I need to open another file
and close it about the same time: just before the end of the same function.
I copy-pasted the code that correctly opens the first file but I am not
seeing the second file open (it is never created, whereas the first file is
created every time).  The purpose of the files are to (1) trace the
processing path and write to file the results of each conditional to file 1
and (2) dump the entire contents of the in-memory data structure to file 2.
I am having a hard time reconsiling what child process has what requesting
IP addresses stored in a recent-hit cache and these files seem like the only
way to debug this.

Any ideas for serialization or opening another file?  Or even just debugging
tips in general?  Apache seems like a difficult environment to debug in
seeing that my module is only deciding which requests to allow and which to
deny (it is similar to mod_(dos_)evasive, but will allow the child processes
to share cache data).


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message