1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
21 #include <nks\netware.h>
23 int nlmUnloadSignaled(int wait);
28 AP_DECLARE(apr_status_t) ap_os_create_privileged_process(
30 apr_proc_t *newproc, const char *progname,
31 const char * const *args,
32 const char * const *env,
33 apr_procattr_t *attr, apr_pool_t *p)
35 return apr_proc_create(newproc, progname, args, env, attr, p);
38 int _NonAppCheckUnload( void )
40 return nlmUnloadSignaled(1);
43 // down server event callback
44 void ap_down_server_cb(void *, void *)
50 // Required place holder event callback
51 void ap_dummy_cb(void *, void *)
56 // destroy callback resources
57 void ap_cb_destroy(void *)
59 // cleanup down event notification
60 UnRegisterEventNotification(eh);
61 NX_UNWRAP_INTERFACE(ref);
62 NX_UNWRAP_INTERFACE(dum);
70 const char *loadDirPath,
71 size_t uninitializedDataLength,
73 int (*readRoutineP)( int conn, void *fileHandle, size_t offset,
74 size_t nbytes, size_t *bytesRead, void *buffer ),
75 size_t customDataOffset,
76 size_t customDataSize,
81 #pragma unused(cmdLine)
82 #pragma unused(loadDirPath)
83 #pragma unused(uninitializedDataLength)
84 #pragma unused(NLMFileHandle)
85 #pragma unused(readRoutineP)
86 #pragma unused(customDataOffset)
87 #pragma unused(customDataSize)
88 #pragma unused(messageCount)
89 #pragma unused(messages)
91 // register for down server event
92 rtag_t rt = AllocateResourceTag(NLMHandle, "Apache2 Down Server Callback",
95 NX_WRAP_INTERFACE((void *)ap_down_server_cb, 2, (void **)&ref);
96 NX_WRAP_INTERFACE((void *)ap_dummy_cb, 2, (void **)&dum);
97 eh = RegisterForEventNotification(rt, EVENT_DOWN_SERVER,
98 EVENT_PRIORITY_APPLICATION,
102 NXVmRegisterExitHandler(ap_cb_destroy, NULL);