]> granicus.if.org Git - apache/commit
Fix zombie process problem with mod_cgi. This problem was introduced
authorJeff Trawick <trawick@apache.org>
Tue, 6 Jun 2000 05:58:16 +0000 (05:58 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 6 Jun 2000 05:58:16 +0000 (05:58 +0000)
commit71a767ce588ae30f864fbb778ca0c51534d6f1b2
treef36ed5345de8c5d7ca3944253bd7789b961f7cbd
parent9445b0807b53db5e48c197095d6a0411ab7ee640
Fix zombie process problem with mod_cgi.  This problem was introduced
as part of the "Convert ap_proc_t to a complete type." enhancement.

mod_cgi previously declared a ptr to an ap_proc_t, storage was allocated
by ap_create_process() from the request pool, and the ap_proc_t address
was passed to ap_note_subprocess().

With the "Convert ap_proc_t to a complete type." change, ap_proc_t
lived in autodata, but the address was still passed to
ap_note_subprocess().  When the pool was cleaned up, the ap_proc_t
in autodata had been used for something else, so the contents were
garbage, but pool cleanup needed the contents, especially the os
pid to pass to waidpid().  Since this was garbage, we never reaped
status from the cgi child and thus the cgi child remained a zombie.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85441 13f79535-47bb-0310-9956-ffa450edef68
modules/generators/mod_cgi.c