I have not been able to use Time.times:

irb(main):004:0> t=Time.times
Errno::E1079322744: Unknown error 1079322744

After discussing with others, it was noted that
my non-working version ran on a linux with libc5.

I noticed in Ruby's time.c:

#ifdef HAVE_SYS_TIMES_H
#include <sys/times.h>
#endif

I have sys/times.h (with linux/times.h), but it still
doesn't work.

Here is an excerpt from my irb session:

irb(main):004:0> t=Time.times
Errno::E1079322744: Unknown error 1079322744
irb(main):011:0> Errno::E1079322744.id
537466350
irb(main):012:0> Errno::E1079322744.id*2
1074932700
irb(main):014:0> ObjectSpace._id2ref(537466350) 
Errno::E1079322744
irb(main):015:0> e=1079322744/2
539661372
irb(main):016:0> ObjectSpace._id2ref(e)
RangeError: 0x202a943c is not id value
(irb):16:in `_id2ref'
(irb):16:in `irb_binding'
irb(main):018:0> [1079322744].pack("l").unpack("P4")[0]
(irb):18: [BUG] Segmentation fault
ruby 1.6.3 (2001-03-19) [i686-linux-libc1]
IOT trap/Abort


1) Is this something that should be working regardless of the 
fact that I am not using glibc2? 

2) What is the meaning of the unknown error number? 

3) Also notice the seg fault.

RCR?
As an alternative, I would find it quite useful to have the
getrusage and getrlimit/setrlimit C structs/functions available in
something like the Process module.


Guy N. Hurst

-- 
HurstLinks Web Development    http://www.hurstlinks.com/
Norfolk, VA  23510            (757)623-9688 FAX 623-0433
PHP/MySQL - Ruby/Perl - HTML/Javascript