David Craven <da...@craven.ch> skribis: >> Is redirecting stdout/stderr to syslog something that >> make-forkexec-constructor could/should do? > > I looked into what would be involved. I included a diff that I didn't > test and don't expect to work. > > The reason why I don't expect this to work is that running echo > "hello" > /dev/log errors. stracing logger "hello" shows that it makes > use of the socket and sendmsg syscalls instead of the usual open and > write syscalls. I don't understand why though, since what's the point > of everything being a file if they don't share the same interface?
The important thing is the special format, which includes the date: sendto(3, "<13>Sep 5 23:09:51 ludo: foo", 29, 0, NULL, 0) = 29 misc/syslog.c:193 in glibc implements this. So we would need to pipe each daemon’s stdout/stderr to the Shepherd itself, which would select(2) on all these, prepend the right prefix, and write that to /dev/log, I think. Ludo’.