2
0

signals.c 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. #include "fspr_arch_threadproc.h"
  17. #include <nks/thread.h>
  18. #include "fspr_private.h"
  19. #include "fspr_pools.h"
  20. #include "fspr_signal.h"
  21. #include "fspr_strings.h"
  22. #include <assert.h>
  23. #if APR_HAS_THREADS && APR_HAVE_PTHREAD_H
  24. #include <pthread.h>
  25. #endif
  26. APR_DECLARE(fspr_status_t) fspr_proc_kill(fspr_proc_t *proc, int signum)
  27. {
  28. return APR_ENOTIMPL;
  29. }
  30. void fspr_signal_init(fspr_pool_t *pglobal)
  31. {
  32. }
  33. const char *fspr_signal_description_get(int signum)
  34. {
  35. switch (signum)
  36. {
  37. case SIGABRT:
  38. return "Abort";
  39. case SIGFPE:
  40. return "Arithmetic exception";
  41. case SIGILL:
  42. return "Illegal instruction";
  43. case SIGINT:
  44. return "Interrupt";
  45. case SIGSEGV:
  46. return "Segmentation fault";
  47. case SIGTERM:
  48. return "Terminated";
  49. case SIGPOLL:
  50. return "Pollable event occurred";
  51. default:
  52. return "unknown signal (not supported)";
  53. }
  54. }
  55. static void *signal_thread_func(void *signal_handler)
  56. {
  57. return NULL;
  58. }
  59. APR_DECLARE(fspr_status_t) fspr_setup_signal_thread(void)
  60. {
  61. int rv = 0;
  62. return rv;
  63. }
  64. APR_DECLARE(fspr_status_t) fspr_signal_block(int signum)
  65. {
  66. return APR_ENOTIMPL;
  67. }
  68. APR_DECLARE(fspr_status_t) fspr_signal_unblock(int signum)
  69. {
  70. return APR_ENOTIMPL;
  71. }