php_pcntl.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Copyright (c) The PHP Group |
  4. +----------------------------------------------------------------------+
  5. | This source file is subject to version 3.01 of the PHP license, |
  6. | that is bundled with this package in the file LICENSE, and is |
  7. | available through the world-wide-web at the following url: |
  8. | https://www.php.net/license/3_01.txt |
  9. | If you did not receive a copy of the PHP license and are unable to |
  10. | obtain it through the world-wide-web, please send a note to |
  11. | license@php.net so we can mail you a copy immediately. |
  12. +----------------------------------------------------------------------+
  13. | Author: Jason Greene <jason@inetgurus.net> |
  14. +----------------------------------------------------------------------+
  15. */
  16. #ifndef PHP_PCNTL_H
  17. #define PHP_PCNTL_H
  18. #if defined(WCONTINUED) && defined(WIFCONTINUED)
  19. #define HAVE_WCONTINUED 1
  20. #endif
  21. extern zend_module_entry pcntl_module_entry;
  22. #define phpext_pcntl_ptr &pcntl_module_entry
  23. #include "php_version.h"
  24. #define PHP_PCNTL_VERSION PHP_VERSION
  25. PHP_MINIT_FUNCTION(pcntl);
  26. PHP_MSHUTDOWN_FUNCTION(pcntl);
  27. PHP_RINIT_FUNCTION(pcntl);
  28. PHP_RSHUTDOWN_FUNCTION(pcntl);
  29. PHP_MINFO_FUNCTION(pcntl);
  30. struct php_pcntl_pending_signal {
  31. struct php_pcntl_pending_signal *next;
  32. zend_long signo;
  33. #ifdef HAVE_STRUCT_SIGINFO_T
  34. siginfo_t siginfo;
  35. #endif
  36. };
  37. ZEND_BEGIN_MODULE_GLOBALS(pcntl)
  38. HashTable php_signal_table;
  39. int processing_signal_queue;
  40. struct php_pcntl_pending_signal *head, *tail, *spares;
  41. int last_error;
  42. volatile char pending_signals;
  43. bool async_signals;
  44. unsigned num_signals;
  45. ZEND_END_MODULE_GLOBALS(pcntl)
  46. #if defined(ZTS) && defined(COMPILE_DL_PCNTL)
  47. ZEND_TSRMLS_CACHE_EXTERN()
  48. #endif
  49. ZEND_EXTERN_MODULE_GLOBALS(pcntl)
  50. #define PCNTL_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(pcntl, v)
  51. #define REGISTER_PCNTL_ERRNO_CONSTANT(name) REGISTER_LONG_CONSTANT("PCNTL_" #name, name, CONST_CS | CONST_PERSISTENT)
  52. #endif /* PHP_PCNTL_H */