From owner-freebsd-bugs Wed Apr 9 08:20:04 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id IAA25149 for bugs-outgoing; Wed, 9 Apr 1997 08:20:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id IAA25136; Wed, 9 Apr 1997 08:20:02 -0700 (PDT) Resent-Date: Wed, 9 Apr 1997 08:20:02 -0700 (PDT) Resent-Message-Id: <199704091520.IAA25136@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, Received:"from apeli.tky.hut.fi (apeli.tky.hut.fi [130.233.17.200]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA24895 for" ; Wed, 9 Apr 1997 08:14:35.-0700 (PDT) Received: (from jari@localhost) by apeli.tky.hut.fi (8.8.5/8.8.5) id RAA12395; Wed, 9 Apr 1997 17:49:20 +0300 (EEST) Message-Id: <199704091449.RAA12395@apeli.tky.hut.fi> Date: Wed, 9 Apr 1997 17:49:20 +0300 (EEST) From: jari@apeli.tky.hut.fi To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/3241: bug with times(3) in 2.2-RELEASE Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 3241 >Category: bin >Synopsis: times(3) returns only stime >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Apr 9 08:20:00 PDT 1997 >Last-Modified: >Originator: Jari Kokko >Organization: La Societe du Billard d'Otaniemi (SBO) >Release: FreeBSD 2.2-RELEASE i386 >Environment: FreeBSD apeli.tky.hut.fi 2.2-RELEASE FreeBSD 2.2-RELEASE #0: Sun Mar 30 19:40:43 EEST 1997 oku@apeli.tky.hut.fi:/usr/src/sys/compile/APELI i386 >Description: the times(3) library function only returns tms_stime in struct tms. >How-To-Repeat: #include #include #include #include main() { unsigned long int i=0; struct tms t; FILE *f; f=fopen("foo", "w"); if (!f) perror("dghj"); fclose(f); for (i=0; i < 100000; i++) sin(60); if ((i=times(&t)) < 0) perror("foo"); printf("utime %d, stime %d, cutime %d, cstime %d\n", t.tms_utime, t.tms_stime, t.tms_cutime, t.tms_cstime); return 0; } $ uname -r; cc -o bar timestst.c -lm; ./bar 2.2-RELEASE utime 0, stime 331, cutime 0, cstime 0 compare that with: $ uname -r ; cc -o bar timestst.c -lm ; ./bar 2.1.5-RELEASE utime 40, stime 2, cutime 0, cstime 0 >Fix: No idea, I'm afraid >Audit-Trail: >Unformatted: