Commit Graph

91 Commits

Author SHA1 Message Date
0a82e00316 Remove unixd_detach function, because it is provided by APR as ap_detach.
This also modifies the ap_detach function to look like unixd_detach.
Finally all calls to unixd_detach are changed to ap_detach.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85635 13f79535-47bb-0310-9956-ffa450edef68
2000-06-20 19:16:18 +00:00
e7a6e84486 fix compile warning
Submitted by:	Victor J. Orlikowski <vjo@raleigh.ibm.com>
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85622 13f79535-47bb-0310-9956-ffa450edef68
2000-06-19 22:29:17 +00:00
c0a4cb7873 More consification, correct command initialisation.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85599 13f79535-47bb-0310-9956-ffa450edef68
2000-06-17 16:29:53 +00:00
750d8cc03c Protect system header files with the appropriate macros.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85558 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 23:03:05 +00:00
580852da85 Clean up a big chunk of ap_config.h. This basically stops ap_config.h from
including any files.  Because of this change, other files must include
their own headers.  I also cleaned up a couple of other bugs in some
modules because I had to compile them all.

I expect this to break multiple platforms, but this will be fixed over time.
The massive configure cleanup is almost done.  I will go through the files
one more time after this commit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85553 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 21:47:17 +00:00
09076e771a Clean up the stat commit. Basically there was one struct stat that I
missed converting to ap_finfo_t.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85545 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 18:07:43 +00:00
2cf4563fcc Including apr_file_io.h is not necessary.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85543 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 17:41:14 +00:00
4f8f778113 Fix typos.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85542 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 17:40:00 +00:00
16748b4e22 Remove the final vestiges of stat.h from Apache 2.0. All calls are now to
ap_stat.  This also adds the new function ap_lstat().  This function is
analogous to lstat.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85535 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 15:29:09 +00:00
eda6e3d23c Add server tokens back to 2.0. Also bring forward the change to allow
the PRODUCT_ONLY value for ServerTokens.  This is relatively clean,
all of the code lives in http_core, and when a module wants to add a token,
they just call ap_add_version_component from the post_config hook.  Actually
ap_add_version_component can be done anytime after the config has been
parsed, it just makes the most sense to do it in post_config IMHO.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85426 13f79535-47bb-0310-9956-ffa450edef68
2000-06-05 19:44:02 +00:00
0cc2db9987 Add pre_config hooks back in for all modules. This is important for the
server tokens code that is coming soon.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85378 13f79535-47bb-0310-9956-ffa450edef68
2000-06-02 15:33:20 +00:00
da493b8be1 PR:
Obtained from:
Submitted by:
Reviewed by:

  Reverse out all _EXPORT_VAR changes back to their original _VAR_EXPORT
  names for linkage (API_, CORE_, and MODULE_).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85318 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 22:40:44 +00:00
5e05af51e4 Pass the process_rec to the MPM to allow rewriting of the args list.
Especially necessary under Win32, or other non-unix front ends where
  oddball arguments might be required, but without causing a mess in
  http_main.c.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85311 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 06:22:55 +00:00
86e2a18f2a This patch corrects the issues from the AP_EXPORT and linkage
specification arguments to the ap_hooks.h declarations.  As with
  the APR_ and AP_ patches, API_VAR_EXPORT becomes API_EXPORT_VAR,
  and MODULE_VAR_EXPORT becomes MODULE_EXPORT_VAR.

  I will be happy to revert the inclusion of ap_config.h from 
  httpd.h if this bothers anyone.  More individual modules need
  to be patched if we do so.

  The API_EXPORTs all moved into central storage in the ap_config.h
  header.  Without WIN32 or API_STATIC compile time declarations, 
  these macros remain no-ops.

  This patch also moves the following data from http_main to http_config:

    const char *ap_server_argv0;
    const char *ap_server_root;
    ap_array_header_t *ap_server_pre_read_config;
    ap_array_header_t *ap_server_post_read_config;
    ap_array_header_t *ap_server_config_defines;

  And the following variables had already moved into ap_hooks.c:

    ap_pool_t *g_pHookPool;  (initialized now in http_config)
    int g_bDebugHooks;                   (out of http_config)
    const char *g_szCurrentHookName;     (out of http_config)

  The changes to http_main.c are in preparation for that module to
  move out to a seperate .exe for win32.  Other platforms will be
  unaffected, outside of these changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85309 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 05:28:02 +00:00
93d9ac51ce Fix a memory leak with ap_wait_or_timeout.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85286 13f79535-47bb-0310-9956-ffa450edef68
2000-05-24 00:42:01 +00:00
6fd5974570 Port mpmt_pthread and dexter to the new ap_proc_t code. This works
just fine for these MPMs and it was easy to make the changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85280 13f79535-47bb-0310-9956-ffa450edef68
2000-05-23 21:27:37 +00:00
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