aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/time
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2012-12-08 17:41:39 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2012-12-08 17:41:39 +0000
commit689f0bd93b9522699a1adb5ecceacc688ba11417 (patch)
treea808e48032b28cd03d3641724ad84dadab396a6b /usr.bin/time
parentcca6f4a8f33296e7e6d1eb4550b3d34ea602069d (diff)
Notes
Diffstat (limited to 'usr.bin/time')
-rw-r--r--usr.bin/time/time.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c
index ebee54225a151..c2ea522f5ec01 100644
--- a/usr.bin/time/time.c
+++ b/usr.bin/time/time.c
@@ -112,7 +112,7 @@ main(int argc, char **argv)
argv += optind;
if (ofn) {
- if ((out = fopen(ofn, aflag ? "a" : "w")) == NULL)
+ if ((out = fopen(ofn, aflag ? "ae" : "we")) == NULL)
err(1, "%s", ofn);
setvbuf(out, (char *)NULL, _IONBF, (size_t)0);
}
@@ -123,8 +123,6 @@ main(int argc, char **argv)
err(1, "time");
/* NOTREACHED */
case 0: /* child */
- if (ofn)
- fclose(out);
execvp(*argv, argv);
err(errno == ENOENT ? 127 : 126, "%s", *argv);
/* NOTREACHED */