aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/time
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2013-02-08 16:10:16 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2013-02-08 16:10:16 +0000
commitd9a447559bc04121f7c6682e64abe67efa154864 (patch)
treeb2f038222ff8a70f687652441df00d2b564c8abe /usr.bin/time
parent3cbf5f97aafc2b249c509ee1162c47c9b28e591e (diff)
parentfbda3d5daeeb730a49d025b614b35a32f0319718 (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 */