Include pid file name in error message for a failed kill(). Prompted by
authornicm <nicm@openbsd.org>
Sat, 24 Jul 2010 00:54:46 +0000 (00:54 +0000)
committernicm <nicm@openbsd.org>
Sat, 24 Jul 2010 00:54:46 +0000 (00:54 +0000)
PR 6288.

ok deraadt

usr.bin/newsyslog/newsyslog.c

index d1ef702..f159361 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: newsyslog.c,v 1.87 2010/03/20 15:15:45 schwarze Exp $ */
+/*     $OpenBSD: newsyslog.c,v 1.88 2010/07/24 00:54:46 nicm Exp $     */
 
 /*
  * Copyright (c) 1999, 2002, 2003 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -407,8 +407,8 @@ send_signal(char *pidfile, int signal)
        else if (noaction)
                (void)printf("kill -%s %ld\n", sys_signame[signal], (long)pid);
        else if (kill(pid, signal))
-               warnx("warning - could not send SIG%s to daemon",
-                   sys_signame[signal]);
+               warnx("warning - could not send SIG%s to PID from pid file %s",
+                   sys_signame[signal], pidfile);
 }
 
 void