php_pcntl.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2016 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Author: Jason Greene <jason@inetgurus.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. /* $Id$ */
  19. #ifndef PHP_PCNTL_H
  20. #define PHP_PCNTL_H
  21. extern zend_module_entry pcntl_module_entry;
  22. #define phpext_pcntl_ptr &pcntl_module_entry
  23. PHP_MINIT_FUNCTION(pcntl);
  24. PHP_MSHUTDOWN_FUNCTION(pcntl);
  25. PHP_RINIT_FUNCTION(pcntl);
  26. PHP_RSHUTDOWN_FUNCTION(pcntl);
  27. PHP_MINFO_FUNCTION(pcntl);
  28. PHP_FUNCTION(pcntl_alarm);
  29. PHP_FUNCTION(pcntl_fork);
  30. PHP_FUNCTION(pcntl_waitpid);
  31. PHP_FUNCTION(pcntl_wait);
  32. PHP_FUNCTION(pcntl_wifexited);
  33. PHP_FUNCTION(pcntl_wifstopped);
  34. PHP_FUNCTION(pcntl_wifsignaled);
  35. PHP_FUNCTION(pcntl_wexitstatus);
  36. PHP_FUNCTION(pcntl_wtermsig);
  37. PHP_FUNCTION(pcntl_wstopsig);
  38. PHP_FUNCTION(pcntl_signal);
  39. PHP_FUNCTION(pcntl_signal_dispatch);
  40. PHP_FUNCTION(pcntl_get_last_error);
  41. PHP_FUNCTION(pcntl_strerror);
  42. #ifdef HAVE_SIGPROCMASK
  43. PHP_FUNCTION(pcntl_sigprocmask);
  44. #endif
  45. #if HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
  46. PHP_FUNCTION(pcntl_sigwaitinfo);
  47. PHP_FUNCTION(pcntl_sigtimedwait);
  48. #endif
  49. PHP_FUNCTION(pcntl_exec);
  50. #ifdef HAVE_GETPRIORITY
  51. PHP_FUNCTION(pcntl_getpriority);
  52. #endif
  53. #ifdef HAVE_SETPRIORITY
  54. PHP_FUNCTION(pcntl_setpriority);
  55. #endif
  56. struct php_pcntl_pending_signal {
  57. struct php_pcntl_pending_signal *next;
  58. long signo;
  59. };
  60. ZEND_BEGIN_MODULE_GLOBALS(pcntl)
  61. HashTable php_signal_table;
  62. int processing_signal_queue;
  63. struct php_pcntl_pending_signal *head, *tail, *spares;
  64. int last_error;
  65. volatile char pending_signals;
  66. ZEND_END_MODULE_GLOBALS(pcntl)
  67. #ifdef ZTS
  68. #define PCNTL_G(v) TSRMG(pcntl_globals_id, zend_pcntl_globals *, v)
  69. #else
  70. #define PCNTL_G(v) (pcntl_globals.v)
  71. #endif
  72. #define REGISTER_PCNTL_ERRNO_CONSTANT(name) REGISTER_LONG_CONSTANT("PCNTL_" #name, name, CONST_CS | CONST_PERSISTENT)
  73. #endif /* PHP_PCNTL_H */
  74. /*
  75. * Local variables:
  76. * tab-width: 4
  77. * c-basic-offset: 4
  78. * indent-tabs-mode: t
  79. * End:
  80. */