Description of Problem: If an output format is specified for the time program a non-zero exit status of the measured program is displayed. Such information should only be shown when the -v option is used. Version-Release number of selected component (if applicable): 1.7-14 How Reproducible: Always Steps to Reproduce: 1. /usr/bin/time -f %e false 2. 3. Actual Results: Command exited with non-zero status 1 0.00 Expected Results: 0.00 Additional Information: Here is a patch: --- time-1.7/time.c.verbose Fri Jun 14 05:38:21 1996 +++ time-1.7/time.c Sun Nov 4 16:21:09 2001 @@ -327,6 +327,8 @@ unsigned long r; /* Elapsed real milliseconds. */ unsigned long v; /* Elapsed virtual (CPU) milliseconds. */ + if (verbose) + { if (WIFSTOPPED (resp->waitstatus)) fprintf (fp, "Command stopped by signal %d\n", WSTOPSIG (resp->waitstatus)); @@ -336,6 +338,7 @@ else if (WIFEXITED (resp->waitstatus) && WEXITSTATUS (resp->waitstatus)) fprintf (fp, "Command exited with non-zero status %d\n", WEXITSTATUS (resp->waitstatus)); + } /* Convert all times to milliseconds. Occasionally, one of these values comes out as zero. Dividing by zero causes problems, so we first
added to 1.7-15 or newer Thanks, Florian La Roche