Commit Graph

75 Commits

Author SHA1 Message Date
488983982b Clean up some pid_t vs. int confusion in mpmt_pthread MPM. This is
needed to avoid some warnings on Solaris.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85276 13f79535-47bb-0310-9956-ffa450edef68
2000-05-23 14:05:53 +00:00
eefcb4c522 Fix warnings on use of common prototypes. Fix bug of printing a
pointer to proc_t instead of the actual pid on error.

Submitted by:	Jeff Trawick, Roy Fielding


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85258 13f79535-47bb-0310-9956-ffa450edef68
2000-05-19 07:14:54 +00:00
c065c11580 Move wait_or_timeout from the MPM's into the new mpm_common.c file. I
also renamed wait_or_timeout to ap_wait_or_timeout for namespace
protection.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85250 13f79535-47bb-0310-9956-ffa450edef68
2000-05-19 01:05:26 +00:00
2a648d2111 First function removed from Unix MPM's and moved to a common file. This
work is not anywhere near finished, but the cleanup has begun at least.
Had to make a couple of variables non-static, so a name change was required
since they are now viewable from outside the library.  The advantage to this
is code that is much easier to maintain into the future, because it is
duplicated less often.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85249 13f79535-47bb-0310-9956-ffa450edef68
2000-05-18 23:25:06 +00:00
da18421916 Fix problem where the Unix mpms had an unitialized variable for
child exit status by adding an exit status parameter to
ap_wait_all_procs(); with this change, the mpms use
ap_wait_all_procs() more like they previously used waitpid().

With the introduction of the exit status parameter, the definition
of ap_wait_t was moved from Apache to APR.  There was some handling
of union wait for the type of the exit status parameter to waitpid()
which I retained (but cannot test).  For WIN32, ap_wait_t was defined
as int (in apr.hw).  No current Windows code uses ap_wait_t, but a
type is required so that references to ap_wait_t in apr_thread_proc.h
can compile on Windows.

Note: There is still a storage leak in the way that the Unix mpms call
ap_wait_all_procs()...  this will be resolved at some later time.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85243 13f79535-47bb-0310-9956-ffa450edef68
2000-05-18 02:17:30 +00:00
f4b9e21f2b Handle some OS/390-isms dealing with pthreads:
. the types of the parameters to pthread_attr_setdetachstate()
  and pthread_detach()
. the fact that sigprocmask() must be use to set a thread's
  signal mask


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85230 13f79535-47bb-0310-9956-ffa450edef68
2000-05-16 17:48:58 +00:00
4bd0fe1c28 Create new function, ap_lingering_close(), which will explicitly do a lingering close
if USE_SO_LINGER is not defined. Move responsibility for closing connections out
of http_connection.c and into the MPMs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85194 13f79535-47bb-0310-9956-ffa450edef68
2000-05-11 21:17:00 +00:00
fcc4d8c669 Port reliable piped logs to mpmt_pthread and dexter. Also a couple of small
cleanups for reliable piped logs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85137 13f79535-47bb-0310-9956-ffa450edef68
2000-05-04 19:42:57 +00:00
8c385f0dbd Make reliable piped logs work on 2.0.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85136 13f79535-47bb-0310-9956-ffa450edef68
2000-05-04 04:02:37 +00:00
5c5d265c73 Use F_SETFL for setting the O_NONBLOCK status flag. F_SETFD is for setting
file descriptor flags (like FD_CLOEXEC).

PR: #47


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85115 13f79535-47bb-0310-9956-ffa450edef68
2000-04-30 21:42:46 +00:00
0cfb1d0be3 Add ap_sigwait() to support old-style sigwait().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85101 13f79535-47bb-0310-9956-ffa450edef68
2000-04-29 23:57:54 +00:00
3548f16478 Fix some problems on systems where EAGAIN != EWOULDBLOCK (e.g., OS/390).
ap_canonical_errror() for Unix now maps EWOULDBLOCK to EAGAIN/APR_EAGAIN
when appropriate so that the changes here (as well as bjh's changes from a
few days ago) to call ap_canonical_error() before comparing with EWOULDBLOCK
will work on Unix as well.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85019 13f79535-47bb-0310-9956-ffa450edef68
2000-04-23 13:22:08 +00:00
de3a77dc01 Change ap_context_t to ap_pool_t. This compiles, runs, and serves pages
on Linux, but probably breaks somewhere.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84963 13f79535-47bb-0310-9956-ffa450edef68
2000-04-14 15:59:20 +00:00
d6fa489cff In mpmt_pthread.c, include <netinet/tcp.h> only if
the system actually has it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84930 13f79535-47bb-0310-9956-ffa450edef68
2000-04-06 02:00:52 +00:00
92cafef56b stop relying on a macro to map signal() to ap_signal(); call
ap_signal() directly


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84914 13f79535-47bb-0310-9956-ffa450edef68
2000-04-05 01:23:51 +00:00
7d1ca34535 The Unix MPM's now use the other_child logic from APR.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84913 13f79535-47bb-0310-9956-ffa450edef68
2000-04-04 22:37:00 +00:00
2bee4ad19d Update to Apache Software License version 1.1
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84879 13f79535-47bb-0310-9956-ffa450edef68
2000-03-31 09:05:25 +00:00
b17ff9b586 An initial implementation for the mpmt_pthread mod_status API. Again,
this is a working implementation, but it is almost definately not a
complete implementation.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84869 13f79535-47bb-0310-9956-ffa450edef68
2000-03-30 22:16:37 +00:00
3fa139e050 Put the pre_config hook back into the table. This solves the problem of
the pre-config hook only being valid for MPM's.  This patch also
distinguishes between STANDARD modules and MPM's.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84862 13f79535-47bb-0310-9956-ffa450edef68
2000-03-30 15:30:36 +00:00
b1c26f031a Fix all the License issues. Including:
s/Apache Group/Apache Software Foundation/
s/1999/2000/
s/Sascha's license/ASF license


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84725 13f79535-47bb-0310-9956-ffa450edef68
2000-03-10 00:07:37 +00:00
4791cb1bf7 Port the scoreboard from the mpmt_pthread MPM to use APR's shared memory.
Tested on Linux, but it could use testing on other platforms.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84621 13f79535-47bb-0310-9956-ffa450edef68
2000-02-14 22:20:34 +00:00
a8ce196da5 Finish the commits for the change in the header files. Basically, this hides
all of the Apache macros that modules don't need access to.  This should
have been committed with the modules, but I wasn't paying attention to the
directory I was in when I ran the commit.
Submitted by:	Manoj Kasichainula and Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84493 13f79535-47bb-0310-9956-ffa450edef68
2000-01-19 01:16:31 +00:00
57a64feae6 Fix some warnings when configured with --enable-maintainer-mode.
ap_start_(shutdown|restart) are no longer static in dexter, because we
explicitly state we are creating them to be called from places other than
the parent.  This is the first in a series of patches to get the 2.0 code
to compile cleanly again.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84290 13f79535-47bb-0310-9956-ffa450edef68
1999-12-13 22:53:25 +00:00
f8be925ab2 Get rid of a couple more ap_os_file_t's along with their platform
dependant code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84283 13f79535-47bb-0310-9956-ffa450edef68
1999-12-13 14:01:35 +00:00
1ab6b7b233 The Unix MPMs were depending on APR for signal.h, and broke. Add an
explicit #include for it back in.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84217 13f79535-47bb-0310-9956-ffa450edef68
1999-12-03 22:11:31 +00:00
1582947dd5 Get rid of ap_check_signals() in all but the prefork MPM, and #define it
away there. It's a TPF-specific piece that will likely go into a TPF
MPM.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84199 13f79535-47bb-0310-9956-ffa450edef68
1999-12-01 00:45:02 +00:00
a7a251cb29 The first part of the big autoconf patch. This replaces a bunch of
NEED_* macros with HAVE_* macros to be more consistent with autoconf.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84186 13f79535-47bb-0310-9956-ffa450edef68
1999-11-29 23:33:24 +00:00
409d49d2f2 Remove the ap_thread_mutex code from all MPM's. This code isn't actually
being called anywhere, and I have compiled dexter, mpmt_pthread, and
prefork without it.  Away it goes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84138 13f79535-47bb-0310-9956-ffa450edef68
1999-11-19 20:27:32 +00:00
e0ff64c186 Finish the conversion from fprintf(stderr -> ap_log_err.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84135 13f79535-47bb-0310-9956-ffa450edef68
1999-11-19 18:49:20 +00:00
370fc31b00 Cleanup the ZZZ comments. Basically these used to mark places where APR
is needed.  It is much easier to do this conversion by hand than by
searching for old comments, so they are going away now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84128 13f79535-47bb-0310-9956-ffa450edef68
1999-11-16 18:32:05 +00:00
5f0ffa5e67 Eliminate acceptlock.c from mpmt_pthread. Use an APR type for the
cross-process lock instead.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84123 13f79535-47bb-0310-9956-ffa450edef68
1999-11-15 23:29:47 +00:00
1901b23ef9 Moving Unix socket IOL's to use APR. Also fixed a small bug in ap_recv.
We should NEVER return a status of APR_EAGAIN and say -1 bytes read.  This
can cause some strange bugs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84120 13f79535-47bb-0310-9956-ffa450edef68
1999-11-15 19:50:25 +00:00
e3e874f7e9 Fix a race condition found by David Colasurdo <davecola@us.ibm.com>. We
should make sure that the parent notes the creation of a child process
in the scoreboard so that perform_idle_server_maintanence doesn't get
the chance to claim that slot.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84116 13f79535-47bb-0310-9956-ffa450edef68
1999-11-11 22:57:19 +00:00
2ab1a9c92c Only process a connection if we've actually accepted one.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84041 13f79535-47bb-0310-9956-ffa450edef68
1999-10-27 06:11:21 +00:00
b1223a54ae Fix warnings from the local/remote_addr stuff properly.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84036 13f79535-47bb-0310-9956-ffa450edef68
1999-10-26 06:05:38 +00:00
cd45909aa5 Fix warnings, and fix a segfault in the process.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84034 13f79535-47bb-0310-9956-ffa450edef68
1999-10-25 23:16:29 +00:00
df37d04f04 Add a context parameter to ap_accept() for the connection socket to be
allocated from. This is needed because the lifetime of a connection is
ususally much shorter than that of the listen socket. Only tested on
OS/2.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84031 13f79535-47bb-0310-9956-ffa450edef68
1999-10-24 13:08:30 +00:00
482dcf3495 Add a status value to ap_log_error and ap_log_rerror. This allows us to use
apr_status codes in our error logs.  The main advantage of this, is portable
error codes.  Now, Windows will finally be able to use errno!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84007 13f79535-47bb-0310-9956-ffa450edef68
1999-10-20 12:50:12 +00:00
644262a3ac Bring network code to the parameter order spec. This means contexts go last,
and result parameters go first.  Also fixed a small bug in the Makefile.  We
should be removing the libs dir when we do a distclean, we are now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83956 13f79535-47bb-0310-9956-ffa450edef68
1999-10-10 20:35:06 +00:00
953b1973c7 Attempt to port mpmt_pthreads to APR, but threads seem to be broken on my plaform
so it is only partially tested.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83955 13f79535-47bb-0310-9956-ffa450edef68
1999-10-10 17:08:07 +00:00
cd06de1ce3 Well this was thought provoking.
Drive out the use of malloc in two places.

In listen.c, using the global process pool instead.  That changes the
API into listen so that a process is passed in rather than the config
pool.  That's all was easy.

The pain is propogating a change into all N of the mpm, they
are all similar but different in their use of listen.c  There
is a lot to dislike about similar but code scattered code.

I changed the N setup_listener routines, they now take only
the server since they can dig the config and global pool
out of there.

Free today: ap_setup_prelinked_modules now takes the process so it
can allocate it's table in the process's pool rathern than use
malloc.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83943 13f79535-47bb-0310-9956-ffa450edef68
1999-10-07 20:48:26 +00:00
2b361ec557 First patch to re-order function parameters. This one gets the low hanging
fruit, and moves most of the result parameters to the first argument.
Future patches in this series will move the rest of the result parameters
to the beginning of the list, and will move the context's to the end of the
list


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83927 13f79535-47bb-0310-9956-ffa450edef68
1999-10-04 16:38:16 +00:00
bf339f0c02 Instead of blocking all signals in child_main, we were unblocking them;
this fixes that. Reported by Dave Colasurdo <davecola@us.ibm.com>.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83904 13f79535-47bb-0310-9956-ffa450edef68
1999-09-17 23:32:11 +00:00
e4e32bb59e A change to how APR uses user data. Now, user data is a linked list that
is retreivable using a char string.  Basically, you provide a string that
will be used as a key when you store the data.  If the key was used before,
we will overwrite the old data.  When you want to retreive your data, pass
in the same key, and we will find the data you care about.  This also makes
it harder to put user data in when creating a context, so that option has
disappeared.  It is also impossible to inherit user data from parent contexts.
This option may be added in later.  I will be documenting this VERY soon.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83901 13f79535-47bb-0310-9956-ffa450edef68
1999-09-14 13:37:45 +00:00
69adf379b4 Remove all of the calls to functions like "ap_popenf". These functions were
moved down to APR, but they are being removed.  They are not portable, and
were only moved down for backwards compatability.  With this change, they can
be safely removed, which is the next commit on it's way.
Submitted by:  Ryan Bloom and Paul Reder


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83879 13f79535-47bb-0310-9956-ffa450edef68
1999-09-08 14:15:55 +00:00
c37f14ddf3 Changed pools to contexts. Tested with prefork and pthread mpm's. I'll
check this out tomorrow and make sure everything was checked in correctly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83852 13f79535-47bb-0310-9956-ffa450edef68
1999-08-31 05:35:52 +00:00
d069a6ea00 Move the code to force Expat linking into common code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83713 13f79535-47bb-0310-9956-ffa450edef68
1999-08-17 22:05:17 +00:00
335b6ab2fc Unbreak dexter and pthread MPM after Ben's latest hook changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83686 13f79535-47bb-0310-9956-ffa450edef68
1999-08-15 11:02:44 +00:00
89338891e0 Move the ap_sys_siglist code from the Unix MPMs to unixd.[ch]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83669 13f79535-47bb-0310-9956-ffa450edef68
1999-08-13 21:54:06 +00:00
2ab2189444 Add a connection ID to conn_rec. It uniquely identifies a connection at
any instant in time. It's not very well tested yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83662 13f79535-47bb-0310-9956-ffa450edef68
1999-08-13 06:58:08 +00:00