Skip to contentSkip to conversation

sysvinit-inittab/start_getty: Fix respawn too fast

PATCH Bertrand Marquis 1 participant 1 message Aug 11, 2022 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi,

Sorry for the mistake, this patch has now been submitted to [email protected] instead.

Please ignore this.

Cheers
Bertrand

Quoted 42 lines · Bertrand Marquis via lists.yoctoproject.org

When an entry in /dev does not exist, start_getty is returning directly. As it is started from init in a respawn mode, it will loop infinitely. In this case add a sleep inside start_getty to prevent the "Respawning too fast" message popping up every 5 minutes.

This case is happening quite often when the system is started as an hypervisor guest as the standard serial line is usually taken by it and removed from the configuration.

This was triggered quite often running linux as dom0 on top of Xen on arm as the serial line is taken by Xen and removed from the device tree.

Use the opportunity to replace one tab with spaces as the rest of the file is using spaces.

---
meta/recipes-core/sysvinit/sysvinit-inittab/start_getty | 5 ++++-

1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-core/sysvinit/sysvinit-inittab/start_getty +0 -0
index 699a1ead1a40..2bfe4310acad 100644
@@ -13,5 +13,8 @@ case $(readlink -f "${getty}") in

esac

if [ -e /sys/class/tty/$2 -a -c /dev/$2 ]; then

meta/recipes-core/sysvinit/sysvinit-inittab/start_getty +4 -1
-	${setsid:-} ${getty} -L $1 $2 $3
+    ${setsid:-} ${getty} -L $1 $2 $3
+else
+    # Prevent respawning to fast error if /dev entry does not exist
+    sleep 1000

fi

Signature · 1 line
2.25.1