php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
globals.c
Go to the documentation of this file.
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: Wez Furlong <wez@php.net> |
14 +----------------------------------------------------------------------+
15*/
16
17#include "php.h"
18#include "php_win32_globals.h"
19#include "syslog.h"
20#include "signal.h"
21
22#ifdef ZTS
23PHPAPI int php_win32_core_globals_id;
24#else
26#endif
27
29{/*{{{*/
31 memset(wg, 0, sizeof(*wg));
32
33 wg->mail_socket = INVALID_SOCKET;
34
35 wg->log_source = INVALID_HANDLE_VALUE;
36}/*}}}*/
37
39{/*{{{*/
41
42 if (wg->registry_key) {
43 RegCloseKey(wg->registry_key);
44 wg->registry_key = NULL;
45 }
46 if (wg->registry_event) {
47 CloseHandle(wg->registry_event);
48 wg->registry_event = NULL;
49 }
50 if (wg->registry_directories) {
52 free(wg->registry_directories);
54 }
55
56 if (INVALID_SOCKET != wg->mail_socket) {
58 wg->mail_socket = INVALID_SOCKET;
59 }
60}/*}}}*/
61
62
63PHP_RSHUTDOWN_FUNCTION(win32_core_globals)
64{/*{{{*/
65 closelog();
66
68
69 return SUCCESS;
70}/*}}}*/
memset(ptr, 0, type->size)
#define NULL
Definition gdcache.h:45
void php_win32_core_globals_ctor(void *vg)
Definition globals.c:28
php_win32_core_globals the_php_win32_core_globals
Definition globals.c:25
void php_win32_core_globals_dtor(void *vg)
Definition globals.c:38
#define SUCCESS
Definition hash_sha3.c:261
#define PHP_RSHUTDOWN_FUNCTION
Definition php.h:403
#define PHPAPI
Definition php.h:71
#define closesocket
Definition php_network.h:24
struct _php_win32_core_globals php_win32_core_globals
PHP_WINUTIL_API void php_win32_signal_ctrl_handler_request_shutdown(void)
Definition signal.c:73
ZEND_API void ZEND_FASTCALL zend_hash_destroy(HashTable *ht)
Definition zend_hash.c:1727