PHP 4.0 Bug #3592: getrusage() returns nothing

From: Date: Wed, 23 Feb 2000 20:11:13 +0000
Subject: PHP 4.0 Bug #3592: getrusage() returns nothing
Groups: php.dev 
Request: Send a blank email to php-dev+get-15902@lists.php.net to get a copy of this message
From: junk-pjp@aontic.com Operating system: FeeBSD PHP version: 4.0 Beta 4 Patch Level 1 PHP Bug Type: Misbehaving function Bug description: getrusage() returns nothing this is in line with http://bugs.php.net/version4/bugs.php?id=3147 but I cannot determine a way of adding information to an existing bug. Have this same problem under FreeBSD with the PHP4b4pl1 release. Someone reported success with the following patch under linux, but I was unable to duplicate it. Index: microtime.c =================================================================== RCS file: /repository/php4/ext/standard/microtime.c,v retrieving revision 1.15 diff -u -u -r1.15 microtime.c --- microtime.c 2000/02/19 23:41:21 1.15 +++ microtime.c 2000/02/23 02:39:02 @@ -22,6 +22,8 @@ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif +#include <sys/resource.h> +#include <unistd.h> #include <string.h> #include <errno.h> @@ -90,6 +92,7 @@ returns an array of usage statistics */ PHP_FUNCTION(getrusage) { +#define HAVE_GETRUSAGE 1 #if HAVE_GETRUSAGE struct rusage usg; int ac = ARG_COUNT(ht);

« previous php.dev (#15902) next »