Re: [systemd-devel] [PATCH] units/serial-getty@.service: use the default RestartSec

2014-07-15 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Jul 15, 2014 at 06:28:10PM +0200, Michael Olbrich wrote:
> For pluggable ttys such as USB serial devices, the getty is restarted
> and exits in a loop until the remove event reaches systemd. Under
> certain circumstances the restart loop can overload the system in a
> way that prevents the remove event from reaching systemd for a long
> time (e.g. at least several minutes on a small embedded system).
> 
> Use the default RestartSec to prevent the restart loop from
> overloading the system. Serial gettys are interactive units, so
> waiting an extra 100ms really doesn't make a difference anyways
> compared to the time it takes the user to log in.
Applied.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] units/serial-getty@.service: use the default RestartSec

2014-07-15 Thread Michael Olbrich
For pluggable ttys such as USB serial devices, the getty is restarted
and exits in a loop until the remove event reaches systemd. Under
certain circumstances the restart loop can overload the system in a
way that prevents the remove event from reaching systemd for a long
time (e.g. at least several minutes on a small embedded system).

Use the default RestartSec to prevent the restart loop from
overloading the system. Serial gettys are interactive units, so
waiting an extra 100ms really doesn't make a difference anyways
compared to the time it takes the user to log in.
--

I'm not sure why this fails now, but I'm not sure if that was because of
systemd (I used v204 before) or the Kernel.
Either way I think this is a good idea to make things more robust.

Michael

 units/serial-getty@.service.m4 | 1 -
 1 file changed, 1 deletion(-)

diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
index 4ac51e7..4522d0d 100644
--- a/units/serial-getty@.service.m4
+++ b/units/serial-getty@.service.m4
@@ -25,7 +25,6 @@ IgnoreOnIsolate=yes
 ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
 Type=idle
 Restart=always
-RestartSec=0
 UtmpIdentifier=%I
 TTYPath=/dev/%I
 TTYReset=yes
-- 
2.0.1

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel