using ttys to restart a process

Richard P. Williamson richard.williamson at u4eatech.com
Wed Aug 25 06:45:35 PDT 2004


Hello,

According to ttys(5) and init(8), init will restart a process if it
is found in ttys.  

Accordingly, I've added these two lines to my ttys file:

           ttyv0 "/bin/stp-server" unknown on
           ttyv1 "/manager/listener 4553" unknown on

The first line appears to result in what I'm looking for, ie
the stp-server runs, and if I kill it, the init process restarts
it.

The second line, however, gives me this message:

Aug 25 14:33:38 FFProRDP init: getty repeating too quickly on \
port /dev/ttyv1, sleeping 30 secs

What I'm looking for is an idea how to debug why the listener
app is choking.  /var/log/messages just repeats the 'init: getty'
line.

TIA,
rip

At 15:41 17/08/2004. Richard P. Williamson had this to say:
>Hello,
>
>4.10-RELEASE
>
>According to ttys(5) and init(8), init will restart a process if it
>is found in ttys.  I can not find, however, an example syntax for
>doing just that.
>
>Say I have a process called /usr/bin/sleeploop
>
># is this how it works?
>sleeper "/usr/bin/sleeploop -q 3000" none on insecure
>
>?  Then, if I killall -s HUP sleeploop, it should 'magically reappear,
>as if by magic', right?
>
>Loath to have a go on this on the running system, on the off chance 
>that I end up by breaking the boot sequence.
>
>TIA,
>rip
>
>_______________________________________________
>freebsd-questions at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"



More information about the freebsd-questions mailing list