summaryrefslogtreecommitdiff
path: root/lib/libc/gen/fmtmsg.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2014-09-18 13:58:20 +0000
committerchristos <christos@NetBSD.org>2014-09-18 13:58:20 +0000
commit2c32905e1bfbd923da80f3b2b717ca983295f8ad (patch)
treeee0132025875532ffa8e7e9480e8dece1419fde2 /lib/libc/gen/fmtmsg.c
parent658a9a8f623a74a2f8d0189494c4822ef512350a (diff)
make more descriptors that we open as close-on-exec
Diffstat (limited to 'lib/libc/gen/fmtmsg.c')
-rw-r--r--lib/libc/gen/fmtmsg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/gen/fmtmsg.c b/lib/libc/gen/fmtmsg.c
index 5bd4c5f07cc..1fd683b37ee 100644
--- a/lib/libc/gen/fmtmsg.c
+++ b/lib/libc/gen/fmtmsg.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fmtmsg.c,v 1.5 2012/03/20 16:36:05 matt Exp $ */
+/* $NetBSD: fmtmsg.c,v 1.6 2014/09/18 13:58:20 christos Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fmtmsg.c,v 1.5 2012/03/20 16:36:05 matt Exp $");
+__RCSID("$NetBSD: fmtmsg.c,v 1.6 2014/09/18 13:58:20 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include <fmtmsg.h>
@@ -213,7 +213,7 @@ fmtmsg(long classification, const char *label, int severity,
}
/* Similar to MM_PRINT but ignoring $MSGVERB. */
if (classification & MM_CONSOLE) {
- if ((console = fopen(_PATH_CONSOLE, "w")) != NULL) {
+ if ((console = fopen(_PATH_CONSOLE, "we")) != NULL) {
if (writeit(console, MM_VERBALL,
label, sevstr, text, action, tag) < 0)
result |= MM_NOCON;
tle='2008-02-09 09:18:07 +0000'>2008-02-09Fix a segfault when doing 'stat -f %R' on the stdin file handle, insteadmlelstv 2006-10-07PR/34662: martijnb at atlas dot ipv6 dot stack dot nl: readlink doesn'telad 2005-06-23Bend the 'L', 'M', and 'H' modifiers to work on the size, whereby itatatat 2005-04-22Fix a trivial truncation case, and eliminate a corner case that mightatatat 2005-01-13Now that tools/compat provides a check, make sure st_birthtimensec existsjmc 2004-12-31Add "dirname"- and "basename"-like functionality to stat(1) by way ofatatat 2004-06-20Completely rework how tools/compat is done. Purge all uses/references tojmc 2004-05-28If using stat (the -L flag) and it fails, fall back to lstat(). Itatatat 2003-10-29Take the time to set gottime so that you don't have to waste timeatatat 2003-10-27be consistent using #if HAVE_STRUCT_STAT_ST_xxx (versus #ifdef)lukem 2003-10-27Overhaul how `build.sh tools' are used:lukem 2003-10-26fix for systems which don't have st_*timespec. PR 23214.chs 2003-07-25More properly host-tool-ify statatatat 2003-07-23* don't compile in support for st_birth #ifdef HOSTPROGlukem 2003-07-20first attempt at making this a HOSTPROGlukem 2003-05-08Add %B to print the st_birthtime of an inode (adjusting the "raw"atatat 2002-10-19use readlink with bufsize - 1; approved thorpej.provos 2002-08-13Use limits.h instead of sys/syslimits.h since it's more potrable.atatat 2002-08-13Style sync with FreeBSD. Changes via Doug Barton <DougB@FreeBSD.org>.atatat 2002-07-09Header reorganization makes a shorter list. From Doug Barton <DougB@FreeBSD....atatat 2002-07-09The bitwise or-ing together of letters is almost *guaranteed* to doatatat 2002-07-08A new command line option, -q, suppresses *stat(2) failure messages.atatat 2002-05-31When asked for the string representation of a device that isn'tatatat 2002-05-09Add a simple format that translates to the current file number, fix anatatat 2002-04-27Add a stat(1) program to /usr/bin. It provides a simple formattingatatat