On Mon, 10 Feb 2020 17:12:53 +0100, Jan Stary wrote: > The -r option of newsyslog(8) removes the requirement > that newsyslog runs as root. Would it also make sense > to not try to send the SIGHUP to syslogd in that case?
This seems wrong to me. You are disabling more than just sending a signal to SIGHUP, this will cause newsyslog to ignore *all* pid files. A better approach would be to avoid initializing working->pidfile to PIDFILE if the euid is non-zero. That way, user-specified pid files are still honored. - todd
