Luoqi Chen wrote:
> Since sometime last month, rc5des failed to start from my rc.local. I did
> a little investigation and it turned out that rc5des was started but later
> terminated by a SIGHUP. During its brief lifetime, /dev/console was its
> control terminal. Does anyone know what was going on?
Something is revoking /dev/console, most of the time, but it varies.
Other times, you get garbage when /etc/rc exits (when using a serial
console).
For example, run from rc.d:
336 con- I+ 0:00.01 /bin/sh /usr/local/bin/safe_mysqld --user=mysql
355 con- S+ 0:00.04 /usr/local/libexec/mysqld --basedir=/usr/local --data
^^^^ revoke(2)ed.
This is a plain syscons boot, nothing special, didn't go into single user.
syslog(3) also suffers as a result of this - it closes and reopens /dev/
console to get around it when asked to do LOG_CONS. fstat(2) on the fd to
/dev/console returns EBADF. This broke postfix too.
Each time I raised the issue, bde told me it wasn't happening. But *something*
is revoking /dev/console, either directly or via a revoke on /dev/ttyv0:
pwroot@overcee[10:50pm]~-104# fstat | grep none
root sh 336 2 - - none -
root cron 218 0 - - none -
root cron 218 1 - - none -
root cron 218 2 - - none -
root syslogd 145 8 - - none -
root adjkerntz 40 0 - - none -
root adjkerntz 40 1 - - none -
root adjkerntz 40 2 - - none -
pwroot@overcee[10:59pm]~ports/sysutils/lsof-111# lsof | grep revoke
adjkerntz 40 root 0u VBAD (revoked)
adjkerntz 40 root 1u VBAD (revoked)
adjkerntz 40 root 2u VBAD (revoked)
syslogd 145 root 8w VBAD (revoked)
cron 218 root 0u VBAD (revoked)
cron 218 root 1u VBAD (revoked)
cron 218 root 2u VBAD (revoked)
sh 336 root 2u VBAD (revoked)
init(8) does a revoke on /dev/ttyv0 after /etc/rc finishes and before the
ttyv0 getty fires up, so I suspect an aliasing problem, but I can't see
what's doing it. (I haven't been annoyed enough to find out what's really
happening)
Oh, also, the rc5des client has changed over the last few months. I found I
had to change it's startup method a few times.
Cheers,
-Peter
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message