diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-09-15 06:15:49 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-09-15 06:15:49 +0000 |
commit | f295c5224e8e8ce01d5f2014e82f433bb2d029c0 (patch) | |
tree | b040ad48a99c9cc60ff43f6d6c374b11fd2caa02 /lib/libc/gen/fstab.c | |
parent | 305e5c9c8be4831136878e3ee72114d74f4e1a4d (diff) |
When fopen()ing internal to libc (the API doesn't support the use
of the resulting FILE *), then pass fopen() the 'e' mode letter to
mark it close-on-exec.
ok miod@
Diffstat (limited to 'lib/libc/gen/fstab.c')
-rw-r--r-- | lib/libc/gen/fstab.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/fstab.c b/lib/libc/gen/fstab.c index 379152bd5f0..bb757341144 100644 --- a/lib/libc/gen/fstab.c +++ b/lib/libc/gen/fstab.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fstab.c,v 1.19 2013/06/01 01:42:55 tedu Exp $ */ +/* $OpenBSD: fstab.c,v 1.20 2014/09/15 06:15:48 guenther Exp $ */ /* * Copyright (c) 1980, 1988, 1993 * The Regents of the University of California. All rights reserved. @@ -196,7 +196,7 @@ setfsent(void) goto fail; } - if ((_fs_fp = fopen(_PATH_FSTAB, "r"))) + if ((_fs_fp = fopen(_PATH_FSTAB, "re"))) return(1); fail: |