PHP  
 PHP: Test and Code Coverage Analysis
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

LCOV - code coverage report
Current view: top level - ext/sysvmsg - sysvmsg.c (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 164 181 90.6 %
Date: 2022-01-18 Functions: 10 10 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :   +----------------------------------------------------------------------+
       3             :   | PHP Version 7                                                        |
       4             :   +----------------------------------------------------------------------+
       5             :   | Copyright (c) 1997-2018 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: Wez Furlong <wez@thebrainroom.com>                           |
      16             :   +----------------------------------------------------------------------+
      17             : */
      18             : 
      19             : #ifdef HAVE_CONFIG_H
      20             : #include "config.h"
      21             : #endif
      22             : 
      23             : #include "php.h"
      24             : #include "php_globals.h"
      25             : #include "ext/standard/info.h"
      26             : #include "php_sysvmsg.h"
      27             : #include "ext/standard/php_var.h"
      28             : #include "zend_smart_str.h"
      29             : 
      30             : /* In order to detect MSG_EXCEPT use at run time; we have no way
      31             :  * of knowing what the bit definitions are, so we can't just define
      32             :  * out own MSG_EXCEPT value. */
      33             : #define PHP_MSG_IPC_NOWAIT      1
      34             : #define PHP_MSG_NOERROR         2
      35             : #define PHP_MSG_EXCEPT          4
      36             : 
      37             : /* True global resources - no need for thread safety here */
      38             : static int le_sysvmsg;
      39             : 
      40             : /* {{{ arginfo */
      41             : ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_get_queue, 0, 0, 1)
      42             :         ZEND_ARG_INFO(0, key)
      43             :         ZEND_ARG_INFO(0, perms)
      44             : ZEND_END_ARG_INFO()
      45             : 
      46             : ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_send, 0, 0, 3)
      47             :         ZEND_ARG_INFO(0, queue)
      48             :         ZEND_ARG_INFO(0, msgtype)
      49             :         ZEND_ARG_INFO(0, message)
      50             :         ZEND_ARG_INFO(0, serialize)
      51             :         ZEND_ARG_INFO(0, blocking)
      52             :         ZEND_ARG_INFO(1, errorcode)
      53             : ZEND_END_ARG_INFO()
      54             : 
      55             : ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_receive, 0, 0, 5)
      56             :         ZEND_ARG_INFO(0, queue)
      57             :         ZEND_ARG_INFO(0, desiredmsgtype)
      58             :         ZEND_ARG_INFO(1, msgtype)
      59             :         ZEND_ARG_INFO(0, maxsize)
      60             :         ZEND_ARG_INFO(1, message)
      61             :         ZEND_ARG_INFO(0, unserialize)
      62             :         ZEND_ARG_INFO(0, flags)
      63             :         ZEND_ARG_INFO(1, errorcode)
      64             : ZEND_END_ARG_INFO()
      65             : 
      66             : ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_remove_queue, 0, 0, 1)
      67             :         ZEND_ARG_INFO(0, queue)
      68             : ZEND_END_ARG_INFO()
      69             : 
      70             : ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_stat_queue, 0, 0, 1)
      71             :         ZEND_ARG_INFO(0, queue)
      72             : ZEND_END_ARG_INFO()
      73             : 
      74             : ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_set_queue, 0, 0, 2)
      75             :         ZEND_ARG_INFO(0, queue)
      76             :         ZEND_ARG_INFO(0, data)
      77             : ZEND_END_ARG_INFO()
      78             : 
      79             : ZEND_BEGIN_ARG_INFO_EX(arginfo_msg_queue_exists, 0, 0, 1)
      80             :         ZEND_ARG_INFO(0, key)
      81             : ZEND_END_ARG_INFO()
      82             : /* }}} */
      83             : 
      84             : /* {{{ sysvmsg_functions[]
      85             :  *
      86             :  * Every user visible function must have an entry in sysvmsg_functions[].
      87             :  */
      88             : static const zend_function_entry sysvmsg_functions[] = {
      89             :         PHP_FE(msg_get_queue,                           arginfo_msg_get_queue)
      90             :         PHP_FE(msg_send,                                        arginfo_msg_send)
      91             :         PHP_FE(msg_receive,                                     arginfo_msg_receive)
      92             :         PHP_FE(msg_remove_queue,                        arginfo_msg_remove_queue)
      93             :         PHP_FE(msg_stat_queue,                          arginfo_msg_stat_queue)
      94             :         PHP_FE(msg_set_queue,                           arginfo_msg_set_queue)
      95             :         PHP_FE(msg_queue_exists,                        arginfo_msg_queue_exists)
      96             :         PHP_FE_END
      97             : };
      98             : /* }}} */
      99             : 
     100             : /* {{{ sysvmsg_module_entry
     101             :  */
     102             : zend_module_entry sysvmsg_module_entry = {
     103             :         STANDARD_MODULE_HEADER,
     104             :         "sysvmsg",
     105             :         sysvmsg_functions,
     106             :         PHP_MINIT(sysvmsg),
     107             :         NULL,
     108             :         NULL,
     109             :         NULL,
     110             :         PHP_MINFO(sysvmsg),
     111             :         PHP_SYSVMSG_VERSION,
     112             :         STANDARD_MODULE_PROPERTIES
     113             : };
     114             : /* }}} */
     115             : 
     116             : #ifdef COMPILE_DL_SYSVMSG
     117             : ZEND_GET_MODULE(sysvmsg)
     118             : #endif
     119             : 
     120           7 : static void sysvmsg_release(zend_resource *rsrc)
     121             : {
     122           7 :         sysvmsg_queue_t *mq = (sysvmsg_queue_t *) rsrc->ptr;
     123           7 :         efree(mq);
     124           7 : }
     125             : 
     126             : /* {{{ PHP_MINIT_FUNCTION
     127             :  */
     128       26000 : PHP_MINIT_FUNCTION(sysvmsg)
     129             : {
     130       26000 :         le_sysvmsg = zend_register_list_destructors_ex(sysvmsg_release, NULL, "sysvmsg queue", module_number);
     131       26000 :         REGISTER_LONG_CONSTANT("MSG_IPC_NOWAIT", PHP_MSG_IPC_NOWAIT, CONST_PERSISTENT|CONST_CS);
     132       26000 :         REGISTER_LONG_CONSTANT("MSG_EAGAIN",   EAGAIN,             CONST_PERSISTENT|CONST_CS);
     133       26000 :         REGISTER_LONG_CONSTANT("MSG_ENOMSG",   ENOMSG,             CONST_PERSISTENT|CONST_CS);
     134       26000 :         REGISTER_LONG_CONSTANT("MSG_NOERROR",    PHP_MSG_NOERROR,    CONST_PERSISTENT|CONST_CS);
     135       26000 :         REGISTER_LONG_CONSTANT("MSG_EXCEPT",     PHP_MSG_EXCEPT,     CONST_PERSISTENT|CONST_CS);
     136       26000 :         return SUCCESS;
     137             : }
     138             : /* }}} */
     139             : 
     140             : /* {{{ PHP_MINFO_FUNCTION
     141             :  */
     142         149 : PHP_MINFO_FUNCTION(sysvmsg)
     143             : {
     144         149 :         php_info_print_table_start();
     145         149 :         php_info_print_table_row(2, "sysvmsg support", "enabled");
     146         149 :         php_info_print_table_end();
     147         149 : }
     148             : /* }}} */
     149             : 
     150             : /* {{{ proto bool msg_set_queue(resource queue, array data)
     151             :    Set information for a message queue */
     152           6 : PHP_FUNCTION(msg_set_queue)
     153             : {
     154             :         zval *queue, *data;
     155           6 :         sysvmsg_queue_t *mq = NULL;
     156             :         struct msqid_ds stat;
     157             : 
     158           6 :         RETVAL_FALSE;
     159             : 
     160           6 :         if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra", &queue, &data) == FAILURE) {
     161           2 :                 return;
     162             :         }
     163             : 
     164           5 :         if ((mq = (sysvmsg_queue_t *)zend_fetch_resource(Z_RES_P(queue), "sysvmsg queue", le_sysvmsg)) == NULL) {
     165           0 :                 RETURN_FALSE;
     166             :         }
     167             : 
     168           5 :         if (msgctl(mq->id, IPC_STAT, &stat) == 0) {
     169             :                 zval *item;
     170             : 
     171             :                 /* now pull out members of data and set them in the stat buffer */
     172           4 :                 if ((item = zend_hash_str_find(Z_ARRVAL_P(data), "msg_perm.uid", sizeof("msg_perm.uid") - 1)) != NULL) {
     173           1 :                         stat.msg_perm.uid = zval_get_long(item);
     174             :                 }
     175           4 :                 if ((item = zend_hash_str_find(Z_ARRVAL_P(data), "msg_perm.gid", sizeof("msg_perm.gid") - 1)) != NULL) {
     176           1 :                         stat.msg_perm.gid = zval_get_long(item);
     177             :                 }
     178           4 :                 if ((item = zend_hash_str_find(Z_ARRVAL_P(data), "msg_perm.mode", sizeof("msg_perm.mode") - 1)) != NULL) {
     179           1 :                         stat.msg_perm.mode = zval_get_long(item);
     180             :                 }
     181           4 :                 if ((item = zend_hash_str_find(Z_ARRVAL_P(data), "msg_qbytes", sizeof("msg_qbytes") - 1)) != NULL) {
     182           1 :                         stat.msg_qbytes = zval_get_long(item);
     183             :                 }
     184           4 :                 if (msgctl(mq->id, IPC_SET, &stat) == 0) {
     185           4 :                         RETVAL_TRUE;
     186             :                 }
     187             :         }
     188             : }
     189             : /* }}} */
     190             : 
     191             : /* {{{ proto array msg_stat_queue(resource queue)
     192             :    Returns information about a message queue */
     193           7 : PHP_FUNCTION(msg_stat_queue)
     194             : {
     195             :         zval *queue;
     196           7 :         sysvmsg_queue_t *mq = NULL;
     197             :         struct msqid_ds stat;
     198             : 
     199           7 :         RETVAL_FALSE;
     200             : 
     201           7 :         if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &queue) == FAILURE) {
     202           2 :                 return;
     203             :         }
     204             : 
     205           6 :         if ((mq = (sysvmsg_queue_t *)zend_fetch_resource(Z_RES_P(queue), "sysvmsg queue", le_sysvmsg)) == NULL) {
     206           0 :                 RETURN_FALSE;
     207             :         }
     208             : 
     209           6 :         if (msgctl(mq->id, IPC_STAT, &stat) == 0) {
     210           5 :                 array_init(return_value);
     211             : 
     212           5 :                 add_assoc_long(return_value, "msg_perm.uid", stat.msg_perm.uid);
     213           5 :                 add_assoc_long(return_value, "msg_perm.gid", stat.msg_perm.gid);
     214           5 :                 add_assoc_long(return_value, "msg_perm.mode", stat.msg_perm.mode);
     215           5 :                 add_assoc_long(return_value, "msg_stime",  stat.msg_stime);
     216           5 :                 add_assoc_long(return_value, "msg_rtime",  stat.msg_rtime);
     217           5 :                 add_assoc_long(return_value, "msg_ctime",  stat.msg_ctime);
     218           5 :                 add_assoc_long(return_value, "msg_qnum",   stat.msg_qnum);
     219           5 :                 add_assoc_long(return_value, "msg_qbytes", stat.msg_qbytes);
     220           5 :                 add_assoc_long(return_value, "msg_lspid",  stat.msg_lspid);
     221           5 :                 add_assoc_long(return_value, "msg_lrpid",  stat.msg_lrpid);
     222             :         }
     223             : }
     224             : /* }}} */
     225             : 
     226             : /* {{{ proto bool msg_queue_exists(int key)
     227             :    Check whether a message queue exists */
     228           4 : PHP_FUNCTION(msg_queue_exists)
     229             : {
     230             :         zend_long key;
     231             : 
     232           4 :         if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &key) == FAILURE) {
     233           0 :                 return;
     234             :         }
     235             : 
     236           4 :         if (msgget(key, 0) < 0) {
     237           3 :                 RETURN_FALSE;
     238             :         }
     239             : 
     240           1 :         RETURN_TRUE;
     241             : }
     242             : /* }}} */
     243             : 
     244             : /* {{{ proto resource msg_get_queue(int key [, int perms])
     245             :    Attach to a message queue */
     246           7 : PHP_FUNCTION(msg_get_queue)
     247             : {
     248             :         zend_long key;
     249           7 :         zend_long perms = 0666;
     250             :         sysvmsg_queue_t *mq;
     251             : 
     252           7 :         if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &key, &perms) == FAILURE)   {
     253           0 :                 return;
     254             :         }
     255             : 
     256           7 :         mq = (sysvmsg_queue_t *) emalloc(sizeof(sysvmsg_queue_t));
     257             : 
     258           7 :         mq->key = key;
     259           7 :         mq->id = msgget(key, 0);
     260           7 :         if (mq->id < 0)   {
     261             :                 /* doesn't already exist; create it */
     262           7 :                 mq->id = msgget(key, IPC_CREAT | IPC_EXCL | perms);
     263           7 :                 if (mq->id < 0)   {
     264           0 :                         php_error_docref(NULL, E_WARNING, "failed for key 0x" ZEND_XLONG_FMT ": %s", key, strerror(errno));
     265           0 :                         efree(mq);
     266           0 :                         RETURN_FALSE;
     267             :                 }
     268             :         }
     269           7 :         ZVAL_COPY_VALUE(return_value, zend_list_insert(mq, le_sysvmsg));
     270             : }
     271             : /* }}} */
     272             : 
     273             : /* {{{ proto bool msg_remove_queue(resource queue)
     274             :    Destroy the queue */
     275           7 : PHP_FUNCTION(msg_remove_queue)
     276             : {
     277             :         zval *queue;
     278           7 :         sysvmsg_queue_t *mq = NULL;
     279             : 
     280           7 :         if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &queue) == FAILURE) {
     281           0 :                 return;
     282             :         }
     283             : 
     284           7 :         if ((mq = (sysvmsg_queue_t *)zend_fetch_resource(Z_RES_P(queue), "sysvmsg queue", le_sysvmsg)) == NULL) {
     285           0 :                 RETURN_FALSE;
     286             :         }
     287             : 
     288           7 :         if (msgctl(mq->id, IPC_RMID, NULL) == 0) {
     289           7 :                 RETVAL_TRUE;
     290             :         } else {
     291           0 :                 RETVAL_FALSE;
     292             :         }
     293             : }
     294             : /* }}} */
     295             : 
     296             : /* {{{ proto mixed msg_receive(resource queue, int desiredmsgtype, int &msgtype, int maxsize, mixed message [, bool unserialize=true [, int flags=0 [, int errorcode]]])
     297             :    Send a message of type msgtype (must be > 0) to a message queue */
     298          13 : PHP_FUNCTION(msg_receive)
     299             : {
     300          13 :         zval *out_message, *queue, *out_msgtype, *zerrcode = NULL;
     301          13 :         zend_long desiredmsgtype, maxsize, flags = 0;
     302          13 :         zend_long realflags = 0;
     303          13 :         zend_bool do_unserialize = 1;
     304          13 :         sysvmsg_queue_t *mq = NULL;
     305          13 :         struct php_msgbuf *messagebuffer = NULL; /* buffer to transmit */
     306             :         int result;
     307             : 
     308          13 :         RETVAL_FALSE;
     309             : 
     310          13 :         if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlz/lz/|blz/",
     311             :                                 &queue, &desiredmsgtype, &out_msgtype, &maxsize,
     312             :                                 &out_message, &do_unserialize, &flags, &zerrcode) == FAILURE) {
     313           5 :                 return;
     314             :         }
     315             : 
     316          11 :         if (maxsize <= 0) {
     317           1 :                 php_error_docref(NULL, E_WARNING, "maximum size of the message has to be greater than zero");
     318           1 :                 return;
     319             :         }
     320             : 
     321          10 :         if (flags != 0) {
     322           7 :                 if (flags & PHP_MSG_EXCEPT) {
     323             : #ifndef MSG_EXCEPT
     324             :                         php_error_docref(NULL, E_WARNING, "MSG_EXCEPT is not supported on your system");
     325             :                         RETURN_FALSE;
     326             : #else
     327           0 :                         realflags |= MSG_EXCEPT;
     328             : #endif
     329             :                 }
     330           7 :                 if (flags & PHP_MSG_NOERROR) {
     331           0 :                         realflags |= MSG_NOERROR;
     332             :                 }
     333           7 :                 if (flags & PHP_MSG_IPC_NOWAIT) {
     334           7 :                         realflags |= IPC_NOWAIT;
     335             :                 }
     336             :         }
     337             : 
     338          10 :         if ((mq = (sysvmsg_queue_t *)zend_fetch_resource(Z_RES_P(queue), "sysvmsg queue", le_sysvmsg)) == NULL) {
     339           0 :                 RETURN_FALSE;
     340             :         }
     341             : 
     342          10 :         messagebuffer = (struct php_msgbuf *) safe_emalloc(maxsize, 1, sizeof(struct php_msgbuf));
     343             : 
     344          10 :         result = msgrcv(mq->id, messagebuffer, maxsize, desiredmsgtype, realflags);
     345             : 
     346          10 :         zval_ptr_dtor(out_msgtype);
     347          10 :         zval_ptr_dtor(out_message);
     348          10 :         ZVAL_LONG(out_msgtype, 0);
     349          10 :         ZVAL_FALSE(out_message);
     350             : 
     351          10 :         if (zerrcode) {
     352           2 :                 zval_ptr_dtor(zerrcode);
     353           2 :                 ZVAL_LONG(zerrcode, 0);
     354             :         }
     355             : 
     356          10 :         if (result >= 0) {
     357             :                 /* got it! */
     358           7 :                 ZVAL_LONG(out_msgtype, messagebuffer->mtype);
     359             : 
     360           7 :                 RETVAL_TRUE;
     361           7 :                 if (do_unserialize)     {
     362             :                         php_unserialize_data_t var_hash;
     363             :                         zval tmp;
     364           2 :                         const unsigned char *p = (const unsigned char *) messagebuffer->mtext;
     365             : 
     366           2 :                         PHP_VAR_UNSERIALIZE_INIT(var_hash);
     367           2 :                         if (!php_var_unserialize(&tmp, &p, p + result, &var_hash)) {
     368           1 :                                 php_error_docref(NULL, E_WARNING, "message corrupted");
     369           1 :                                 RETVAL_FALSE;
     370             :                         } else {
     371           1 :                                 ZVAL_COPY_VALUE(out_message, &tmp);
     372             :                         }
     373           2 :                         PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
     374             :                 } else {
     375          10 :                         ZVAL_STRINGL(out_message, messagebuffer->mtext, result);
     376             :                 }
     377           3 :         } else if (zerrcode) {
     378           1 :                 ZVAL_LONG(zerrcode, errno);
     379             :         }
     380          10 :         efree(messagebuffer);
     381             : }
     382             : /* }}} */
     383             : 
     384             : /* {{{ proto bool msg_send(resource queue, int msgtype, mixed message [, bool serialize=true [, bool blocking=true [, int errorcode]]])
     385             :    Send a message of type msgtype (must be > 0) to a message queue */
     386          11 : PHP_FUNCTION(msg_send)
     387             : {
     388          11 :         zval *message, *queue, *zerror=NULL;
     389             :         zend_long msgtype;
     390          11 :         zend_bool do_serialize = 1, blocking = 1;
     391          11 :         sysvmsg_queue_t * mq = NULL;
     392          11 :         struct php_msgbuf * messagebuffer = NULL; /* buffer to transmit */
     393             :         int result;
     394          11 :         int message_len = 0;
     395             : 
     396          11 :         RETVAL_FALSE;
     397             : 
     398          11 :         if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlz|bbz/",
     399             :                                 &queue, &msgtype, &message, &do_serialize, &blocking, &zerror) == FAILURE) {
     400           4 :                 return;
     401             :         }
     402             : 
     403          10 :         if ((mq = (sysvmsg_queue_t *)zend_fetch_resource(Z_RES_P(queue), "sysvmsg queue", le_sysvmsg)) == NULL) {
     404           0 :                 RETURN_FALSE;
     405             :         }
     406             : 
     407          10 :         if (do_serialize) {
     408           2 :                 smart_str msg_var = {0};
     409             :                 php_serialize_data_t var_hash;
     410             : 
     411           2 :                 PHP_VAR_SERIALIZE_INIT(var_hash);
     412           2 :                 php_var_serialize(&msg_var, message, &var_hash);
     413           2 :                 PHP_VAR_SERIALIZE_DESTROY(var_hash);
     414             : 
     415             :                 /* NB: php_msgbuf is 1 char bigger than a long, so there is no need to
     416             :                  * allocate the extra byte. */
     417           2 :                 messagebuffer = safe_emalloc(ZSTR_LEN(msg_var.s), 1, sizeof(struct php_msgbuf));
     418           2 :                 memcpy(messagebuffer->mtext, ZSTR_VAL(msg_var.s), ZSTR_LEN(msg_var.s) + 1);
     419           2 :                 message_len = ZSTR_LEN(msg_var.s);
     420             :                 smart_str_free(&msg_var);
     421             :         } else {
     422             :                 char *p;
     423          16 :                 switch (Z_TYPE_P(message)) {
     424           2 :                         case IS_STRING:
     425           2 :                                 p = Z_STRVAL_P(message);
     426           2 :                                 message_len = Z_STRLEN_P(message);
     427           2 :                                 break;
     428             : 
     429           1 :                         case IS_LONG:
     430           1 :                                 message_len = spprintf(&p, 0, ZEND_LONG_FMT, Z_LVAL_P(message));
     431           1 :                                 break;
     432           0 :                         case IS_FALSE:
     433           0 :                                 message_len = spprintf(&p, 0, "0");
     434           0 :                                 break;
     435           1 :                         case IS_TRUE:
     436           1 :                                 message_len = spprintf(&p, 0, "1");
     437           1 :                                 break;
     438           2 :                         case IS_DOUBLE:
     439           2 :                                 message_len = spprintf(&p, 0, "%F", Z_DVAL_P(message));
     440           2 :                                 break;
     441           2 :                         default:
     442           2 :                                 php_error_docref(NULL, E_WARNING, "Message parameter must be either a string or a number.");
     443           2 :                                 RETURN_FALSE;
     444             :                 }
     445             : 
     446           6 :                 messagebuffer = safe_emalloc(message_len, 1, sizeof(struct php_msgbuf));
     447           6 :                 memcpy(messagebuffer->mtext, p, message_len + 1);
     448             : 
     449          12 :                 if (Z_TYPE_P(message) != IS_STRING) {
     450           4 :                         efree(p);
     451             :                 }
     452             :         }
     453             : 
     454             :         /* set the message type */
     455           8 :         messagebuffer->mtype = msgtype;
     456             : 
     457           8 :         result = msgsnd(mq->id, messagebuffer, message_len, blocking ? 0 : IPC_NOWAIT);
     458             : 
     459           8 :         efree(messagebuffer);
     460             : 
     461           8 :         if (result == -1) {
     462           1 :                 php_error_docref(NULL, E_WARNING, "msgsnd failed: %s", strerror(errno));
     463           1 :                 if (zerror) {
     464           1 :                         zval_ptr_dtor(zerror);
     465           1 :                         ZVAL_LONG(zerror, errno);
     466             :                 }
     467             :         } else {
     468           7 :                 RETVAL_TRUE;
     469             :         }
     470             : }
     471             : /* }}} */
     472             : 
     473             : /*
     474             :  * Local variables:
     475             :  * tab-width: 4
     476             :  * c-basic-offset: 4
     477             :  * End:
     478             :  * vim600: noet sw=4 ts=4 tw=78 fdm=marker
     479             :  * vim<600: noet sw=4 ts=4 tw=78
     480             :  */

Generated by: LCOV version 1.10

Generated at Wed, 19 Jan 2022 00:14:26 +0000 (3 days ago)

Copyright © 2005-2022 The PHP Group
All rights reserved.