#787958 util-linux: logger should reopen connection to syslogd, maybe on signal

Package:
util-linux
Source:
util-linux
Description:
miscellaneous system utilities
Submitter:
Thorsten Glaser
Date:
2021-04-09 19:54:21 UTC
Severity:
wishlist
Tags:
#787958#5
Date:
2015-06-06 21:18:51 UTC
From:
To:
I've got a long-running thing, something like this, in shell:

( (foo | bar) 2>&1 | logger -t blah ) &

Now, while this is running, I can send one of the foo or bar
programs a signal to dump statistics, and this is written to
syslog by logger(1). So far, so well. Unfortunately, recently
inetutils-syslogd was updated (and thus restarted), and ever
since, the messages have ceased.

Looking at /proc/*/fd/ the connection is open only one-sided.

I wish for logger to either restart the connection by itself
or offer something like SIGUSR1 to do so, for such scenarios.
The alternative, in shell, would be…

( (foo | bar) 2>&1 | while IFS= read -r; do logger -t blah "$REPLY"; done ) &

… which would be a true waste of CPU time (and pid space),
as logger otherwise fully implements this itself. Hence, I
set the priority to “wishlist”.

Thanks in advance!