cvs: php4 /ext/pcntl pcntl.c php_pcntl.h
| From: | Edin Kadribasic | Date: | Tue, 04 Jun 2002 15:51:27 +0000 |
| Subject: | cvs: php4 /ext/pcntl pcntl.c php_pcntl.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12225@lists.php.net to get a copy of this message | ||
edink Tue Jun 4 11:51:27 2002 EDT
Modified files:
/php4/ext/pcntl pcntl.c php_pcntl.h
Log:
Added function pcntl_alarm().
@- Added pctnl_alarm() function. (Edin)
Index: php4/ext/pcntl/pcntl.c
diff -u php4/ext/pcntl/pcntl.c:1.26 php4/ext/pcntl/pcntl.c:1.27
--- php4/ext/pcntl/pcntl.c:1.26 Mon May 6 19:01:46 2002
+++ php4/ext/pcntl/pcntl.c Tue Jun 4 11:51:24 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pcntl.c,v 1.26 2002/05/06 23:01:46 jason Exp $ */
+/* $Id: pcntl.c,v 1.27 2002/06/04 15:51:24 edink Exp $ */
#define PCNTL_DEBUG 0
@@ -51,6 +51,7 @@
PHP_FE(pcntl_wtermsig, NULL)
PHP_FE(pcntl_wstopsig, NULL)
PHP_FE(pcntl_exec, NULL)
+ PHP_FE(pcntl_alarm, NULL)
{NULL, NULL, NULL}
};
@@ -213,6 +214,19 @@
}
RETURN_LONG((long) id);
+}
+/* }}} */
+
+/* {{{ proto int pcntl_alarm(int seconds)
+ Set an alarm clock for delivery of a signal*/
+PHP_FUNCTION(pcntl_alarm)
+{
+ long seconds;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &seconds) == FAILURE)
+ return;
+
+ RETURN_LONG ((long) alarm(seconds));
}
/* }}} */
Index: php4/ext/pcntl/php_pcntl.h
diff -u php4/ext/pcntl/php_pcntl.h:1.9 php4/ext/pcntl/php_pcntl.h:1.10
--- php4/ext/pcntl/php_pcntl.h:1.9 Sat Mar 16 17:31:57 2002
+++ php4/ext/pcntl/php_pcntl.h Tue Jun 4 11:51:25 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcntl.h,v 1.9 2002/03/16 22:31:57 mfischer Exp $ */
+/* $Id: php_pcntl.h,v 1.10 2002/06/04 15:51:25 edink Exp $ */
#ifndef PHP_PCNTL_H
#define PHP_PCNTL_H
@@ -39,6 +39,7 @@
PHP_RSHUTDOWN_FUNCTION(pcntl);
PHP_MINFO_FUNCTION(pcntl);
+PHP_FUNCTION(pcntl_alarm);
PHP_FUNCTION(pcntl_fork);
PHP_FUNCTION(pcntl_waitpid);
PHP_FUNCTION(pcntl_wifexited);