php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3592 getrusage() returns nothing
Submitted: 2000-02-23 15:11 UTC Modified: 2000-02-23 15:23 UTC
From: junk-pjp at aontic dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Beta 4 Patch Level 1 OS: FeeBSD
Private report: No CVE-ID: None
 [2000-02-23 15:11 UTC] junk-pjp at aontic dot com
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);

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-02-23 15:23 UTC] sas at cvs dot php dot net
Fixed in CVS. Thanks for your report.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Mon Oct 12 14:00:01 2026 UTC