Commit c2abb21c authored by Ruediger Pluem's avatar Ruediger Pluem
Browse files

* Use local pid table also for OS/2 MPM


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/httpd-pid-table@543654 13f79535-47bb-0310-9956-ffa450edef68
parent a6bb0b86
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include "httpd.h"
#include "mpm_default.h"
#include "scoreboard.h"
#include "mpm_common.h"

#define MPM_NAME "MPMT_OS2"

+9 −1
Original line number Diff line number Diff line
@@ -281,6 +281,7 @@ static char master_main()
#endif
    if (one_process) {
        ap_scoreboard_image->parent[0].pid = getpid();
        ap_set_pid_table(getpid());
        ap_mpm_child_main(pconf);
        return FALSE;
    }
@@ -313,6 +314,7 @@ static char master_main()
            if (slot < HARD_SERVER_LIMIT) {
                ap_scoreboard_image->parent[slot].pid = 0;
                ap_scoreboard_image->parent[slot].quiescing = 0;
                ap_unset_pid_table(child_pid);

                if (proc_rc.codeTerminate == TC_EXIT) {
                    /* Child terminated normally, check its exit code and
@@ -330,7 +332,12 @@ static char master_main()

    /* Signal children to shut down, either gracefully or immediately */
    for (slot=0; slot<HARD_SERVER_LIMIT; slot++) {
      kill(ap_scoreboard_image->parent[slot].pid, is_graceful ? SIGHUP : SIGTERM);
        PID pid;

        pid = ap_scoreboard_image->parent[n].pid;
        if (ap_in_pid_table(pid)) {
            kill(pid, is_graceful ? SIGHUP : SIGTERM);
        }
    }

    DosFreeMem(parent_info);
@@ -364,6 +371,7 @@ static void spawn_child(int slot)
    }

    ap_scoreboard_image->parent[slot].pid = proc_rc.codeTerminate;
    ap_set_pid_table(proc_rc.codeTerminate);
}