Skip to contentSkip to conversation

[2.5] Non-blocking write can block

PATCH Ben Pfaff 1 participant 1 message Jun 4, 2003 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Ben Pfaff

author
#2 lore raw
Quoted 7 lines · Linus Torvalds
Quoted 6 lines · Hua Zhong

We ran into this problem here in an embedded environment. It causes syslogd to hang and when this happens, everybody who talks to syslogd hangs. Which means you may not even be able to login. In the end we used exactly the same fix which seems to work.

Quoted 6 lines
Quoted 1 line

I am curious to know the correct fix.

[ First off: your embedded syslog problem is fixed by making sure that
syslog doesn't try to write to a tty that somebody else might be blocked. In other words, to me it sounds like a "well, don't do that then" schenario, rather than a real kernel problem. ]

One day I managed to keep myself from logging in or su'ing or doing a number of things that needed the log for a quite a while by accidentally hitting Scroll Lock on a console that syslog was set up to log to. I suppose the answer is "don't do that" but it was a mysterious problem for several minutes that day.

Signature · 2 lines
"Let others praise ancient times; I am glad I was born in these."
--Ovid (43 BC-18 AD)