tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

New syslog openlog option?



Hi folks,

I have been debugging a strange problem in a pretty minimal setup where
init failed to exec the custom getty once reaching multiuser. Leaving out
all the details, this was pretty tough to attack because in my setup there
is no syslogd running, so the syslog calls from init go straight to the
console. However, since syslog does not want to block on a stopped console,
it opens /dev/console in nonblocking mode. In my case this led to all messages
from init being randomly truncated.

For now I've fixed this by just (locally) commenting out the nonblocking flag
in the syslog function, but I wonder if there is (or should?) be some better
way to handle this w/o source changes.

How about a openlog flag that tells syslog to avoid nonblocking console IO,
and init using that untill the first getty has been successfully spawned,
then revoking it?

But maybe it is too much of a hack for a special case.

Am I overlooking other easy ways to help in this scenario?

Martin


Home | Main Index | Thread Index | Old Index