summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/misc.c b/misc.c
index 8398f0b36..73723d197 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.c,v 1.112 2017/08/18 05:36:45 djm Exp $ */ 1/* $OpenBSD: misc.c,v 1.113 2017/08/18 05:48:04 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved. 4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -1570,7 +1570,7 @@ subprocess(const char *tag, struct passwd *pw, const char *command,
1570 1570
1571/* Returns 0 if pid exited cleanly, non-zero otherwise */ 1571/* Returns 0 if pid exited cleanly, non-zero otherwise */
1572int 1572int
1573exited_cleanly(pid_t pid, const char *tag, const char *cmd) 1573exited_cleanly(pid_t pid, const char *tag, const char *cmd, int quiet)
1574{ 1574{
1575 int status; 1575 int status;
1576 1576
@@ -1584,7 +1584,8 @@ exited_cleanly(pid_t pid, const char *tag, const char *cmd)
1584 error("%s %s exited on signal %d", tag, cmd, WTERMSIG(status)); 1584 error("%s %s exited on signal %d", tag, cmd, WTERMSIG(status));
1585 return -1; 1585 return -1;
1586 } else if (WEXITSTATUS(status) != 0) { 1586 } else if (WEXITSTATUS(status) != 0) {
1587 error("%s %s failed, status %d", tag, cmd, WEXITSTATUS(status)); 1587 do_log2(quiet ? SYSLOG_LEVEL_DEBUG1 : SYSLOG_LEVEL_INFO,
1588 "%s %s failed, status %d", tag, cmd, WEXITSTATUS(status));
1588 return -1; 1589 return -1;
1589 } 1590 }
1590 return 0; 1591 return 0;