We are in the context of a new slint installer, rc.S2 is running and is the last (interactive) part of rc.S, i.e. "do you want to change your keymap" etc.
Here is an sample output of "ps -AT --forest" inserted at the beginning of rc.S2:
Code:
PID TTY STAT TIME COMMAND
300 tty1 Ss+ 0:00 /bin/sh /etc/rc.d/start_rc.S2
332 tty1 R+ 0:00 \_ /usr/bin/fbterm -n DejaVu Sans Mono -s 30 -- /etc/rc.d/rc.S2
335 pts/0 Ss+ 0:00 \_ /bin/sh /etc/rc.d/rc.S2
339 pts/0 R+ 0:00 \_ ps -aT --forest
Now, given that fbterm's standard error is redirected say to /tmp/err, I want that rc.S2 first check that file for fatal errors [*], that can result in a black screen and a lost user. In that case rc.S2 should kill fbterm (its parent), then be attached to its grand-parent /etc/rc.d/start_rc.S2 (or directly to init).
But of course I want to avoid that rc.S2 killing his father kill itself as that would abort the installation (any similarity with events of the Greek mythology would be a pure coincidence :-)
Of course any user input at this stage is not an option.
I'd be grateful of any clue, feel free to ask any more information and make any suggestion.
The aim is that the installer can detect an FbTerm's irrecoverable error resulting in a black screen, then automatically falling back to a standard Linux terminal.
At the moment if that happens the user can restart the installer appending " fbt=n" to the kernel command line, but I'd prefer to avoid this kind of _not_so_user_friendly workaround as much as possible.
[*] This can happen for instance if fbterm can't find the top left of the screen as the relevant VESA function call fails, in case of some weird video card and/or monitor. Thanks Diantre for testing, by the way.