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 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 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. 15 */ 16 17 #include "apr_arch_threadproc.h" 18 #include "apr_private.h" 19 #include "apr_pools.h" 20 #include "apr_signal.h" 21 #include "apr_strings.h" 22 23 #include <assert.h> 24 #if APR_HAS_THREADS && APR_HAVE_PTHREAD_H 25 #include <pthread.h> 26 #endif 27 apr_proc_kill(apr_proc_t * proc,int signum)28APR_DECLARE(apr_status_t) apr_proc_kill(apr_proc_t *proc, int signum) 29 { 30 return APR_ENOTIMPL; 31 } 32 33 apr_signal_init(apr_pool_t * pglobal)34void apr_signal_init(apr_pool_t *pglobal) 35 { 36 } 37 apr_signal_description_get(int signum)38const char *apr_signal_description_get(int signum) 39 { 40 switch (signum) 41 { 42 case SIGABRT: 43 return "Abort"; 44 case SIGFPE: 45 return "Arithmetic exception"; 46 case SIGILL: 47 return "Illegal instruction"; 48 case SIGINT: 49 return "Interrupt"; 50 case SIGSEGV: 51 return "Segmentation fault"; 52 case SIGTERM: 53 return "Terminated"; 54 case SIGPOLL: 55 return "Pollable event occurred"; 56 default: 57 return "unknown signal (not supported)"; 58 } 59 } 60 signal_thread_func(void * signal_handler)61static void *signal_thread_func(void *signal_handler) 62 { 63 return NULL; 64 } 65 66 #if (APR_HAVE_SIGWAIT || APR_HAVE_SIGSUSPEND) apr_setup_signal_thread(void)67APR_DECLARE(apr_status_t) apr_setup_signal_thread(void) 68 { 69 return 0; 70 } 71 #endif /* (APR_HAVE_SIGWAIT || APR_HAVE_SIGSUSPEND) */ 72 apr_signal_block(int signum)73APR_DECLARE(apr_status_t) apr_signal_block(int signum) 74 { 75 return APR_ENOTIMPL; 76 } 77 apr_signal_unblock(int signum)78APR_DECLARE(apr_status_t) apr_signal_unblock(int signum) 79 { 80 return APR_ENOTIMPL; 81 } 82