[BRLTTY] startup/shutdown question

Dave Mielke dave at mielke.cc
Wed Dec 10 12:38:47 EST 2014


[quoted lines by Didier Spaier on 2014/12/10 at 12:39 +0100]

>To insure a clean startup/shutdown of brltty in Slackware, imitating
>what's done for other daemons, I could do this:
...
>  killall brltty 2> /dev/null
...
>What do you think?

I'm not a fan of the arbitrary discarding of output to standard error. That 
makes it very difficult to figure out what a problem is should one occur.

there's a much better way than using killall to terminate brltty. If you use 
brltty's -P (upercase) option to specify a pid file when you start it, then you 
can specify that same pid file, along with brltty's -C (cancel-execution) 
option, to terminate it. For example:

   to start: /bin/brltty -P /var/run/brltty.pid
   to stop:  /bin/brty -P /var/run/brltty.pid -C

>Is it useful to kill the daemon before shutdown?

It isn't necessary. The two benefits I can think of are that it'll leave a 
meaningful message (brltty stopped) on the braille device, and it may avoid a 
multi-second wait by the system shutdown sequence for all proceses to 
terminate.

>are there actual use cases for 'restart'?

Since no sofrtare is perfect, supporting restart is always a good idea. 
Additionally, especially since it really isn't much trouble, why not simply 
support as many of the standard actions as possible. If you use brltty's -P 
option, then you could even implement the status action to, among other things, 
show the pid.

-- 
Dave Mielke           | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario   | http://Mielke.cc/bible/
EMail: dave at mielke.cc | Canada  K2A 1H7   | http://FamilyRadio.com/


More information about the BRLTTY mailing list