From: Jason McIntyre Subject: Re: newsyslog: optional signal field, enable F flag To: tech@openbsd.org Date: Mon, 22 Apr 2024 15:17:03 +0100 On Sun, Apr 21, 2024 at 11:21:07PM +0200, Alvar Penning wrote: > 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. hi. i committed the doc fix. i'll leave feedback on the code proposal to someone else though... jmc > - 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) {