Index | Thread | Search

From:
Alvar Penning <post@0x21.biz>
Subject:
newsyslog: optional signal field, enable F flag
To:
tech@openbsd.org
Date:
Sun, 21 Apr 2024 23:21:07 +0200

Download raw body.

Thread
Hi all,

I attached two small diffs for newsyslog, which resulted as a byproduct
of another change I hope to send here soon.

- The first diff clarifies in newsyslog(8) that the signal field is
  optional, as it is stated there for every other optional field.
- The second diff allows using the F flag on its own. Before it was
  possible to use the F flag if it followed other flags. However, when
  either being the leading or only flag, it was rejected.

Best,
Alvar
diff --git usr.bin/newsyslog/newsyslog.8 usr.bin/newsyslog/newsyslog.8
index 3153250c62c..0de44e17718 100644
--- usr.bin/newsyslog/newsyslog.8
+++ usr.bin/newsyslog/newsyslog.8
@@ -399,7 +399,7 @@ signal (usually
 to instead of
 .Pa /var/run/syslog.pid .
 .It Ar signal
-Specify the signal to send to the process instead of
+This optional field specifies the signal to send to the process instead of
 .Dv SIGHUP .
 Signal names
 must start with
diff --git usr.bin/newsyslog/newsyslog.c usr.bin/newsyslog/newsyslog.c
index a79106c7743..24d0e102a11 100644
--- usr.bin/newsyslog/newsyslog.c
+++ usr.bin/newsyslog/newsyslog.c
@@ -616,7 +616,7 @@ nextline:
 
 		q = sob(++parse);	/* Optional field */
 		if (*q == 'Z' || *q == 'z' || *q == 'B' || *q == 'b' ||
-		    *q == 'M' || *q == 'm') {
+		    *q == 'M' || *q == 'm' || *q == 'F' || *q == 'f') {
 			*(parse = son(q)) = '\0';
 			while (*q) {
 				switch (*q) {