[BRLTTY] brltty crashing shortly after starting

Dave Mielke dave at mielke.cc
Mon Dec 7 17:19:56 EST 2015


[quoted lines by Mike Gorse on 2015/12/07 at 16:58 -0500]

>From Autostart/Udev/udev.rules:
...
>RUN+="/bin/brltty -E -P$env{BRLTTY_PID_FILE}"
...
>
>From the udev manpage on my system:
>       RUN{type}
>	   Add a program to the list of programs to be executed after processing all the rules for a specific event, depending on "type":
>...
>	   This can only be used for very short-running foreground tasks. Running an event process for a long period of time may block all further events for this or a dependent device.
>
>	   Starting daemons or other long-running processes is not appropriate for udev; the forked processes, detached or not, will be unconditionally killed after the event handling has
>	   finished.

This isn't a problem because brltty forks into the background almost right 
away. Note that it's -n (--no-daemon) option isn't being used.

The reason that using an older systemd with brltty's newer service unit is 
causing a problem is because the newer service unit tells systemd to wait till 
brltty notifies it that it's up and running. This isn't an issue if the older 
service unit is used.

>Anyway, this has been discussed on the list before; I've been trying
>to modify my udev file to start brltty via systemd but haven't
>succeeded in actually getting it to start so far, although it will
>start if I manually start it via systemctl or probably if I enable it
>to start at boot-up.

Just use the older service unit. I've attached it to this message (as 
brltty-old.service). Remember to rename it.

-- 
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.org/
-------------- next part --------------
[Unit]

Description=Braille Device Support
Documentation=man:brltty(1)
Documentation=http://mielke.cc/brltty/

DefaultDependencies=no
Before=sysinit.target


[Service]

Type=forking
PIDFile=/run/brltty.pid
ExecStart=/bin/brltty -P /run/brltty.pid

TimeoutStartSec=5
TimeoutStopSec=10

Restart=always
RestartSec=30

Nice=-10
OOMScoreAdjust=-900

ProtectHome=read-only
ProtectSystem=full
SystemCallArchitectures=native


[Install]
WantedBy=sysinit.target




More information about the BRLTTY mailing list