[prev in list] [next in list] [prev in thread] [next in thread]
List: log
Subject: Re: daemon tools under Solaris
From: prj () po ! cwru ! edu (Paul Jarc)
Date: 2001-10-16 17:42:35
[Download message RAW]
Jason Kawaja <kawaja@ece.ufl.edu> wrote:
> On Tue, 16 Oct 2001, Dan Rench wrote:
>> SV:123456:respawn:/command/svscanboot < /dev/null
>
> it's my understanding that svscanboot simply runs svscan with some extras
> (i have daemontools 0.70). so why is a continuous eof needed for svscan?
The reason for redirecting descriptor 0 from /dev/null is that your
daemons should not be reading from the console, and on some systems (I
think), init runs the commands in inittab with descriptor 0 reading
from /dev/console.
svscanboot already does "exec < /dev/null". The reason for doing this
again in the inittab line is that on some systems including Solaris,
init starts its commands with no open file descriptors, so when
/bin/sh opens the script, the script is on descriptor 0, and on some
systems including Solaris, /bin/sh does not protect itself from losing
the script descriptor via a redirection in the script.
> it's also my understanding that sending a continuous eof to a process that
> is still attached to a terminal device effectively blocks anything from
> being read from that device for that process..
The process will see only EOF on that descriptor, but it can still
open /dev/tty to get a descriptor for the terminal and read from that.
> however a check on my svscan process shows no terminal device
> assignment.
As it should be. But a process can have a descriptor for a terminal,
while also not having a controlling terminal. svscanboot might have
been started with descriptor 0 reding from /dev/console, even though
it had no controlling tty.
> i run svscan from inittab (solaris) without any assignment and services
> work properly.
If you're not using svscanboot, then you're avoiding the /bin/sh bug
that svscanboot triggers, and which the redirection in inittab
circumvents.
paul
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic