Another major bug fixed - Slackware users should be happy
- From: Pavel Roskin <proski gnu org>
- To: <mc-devel gnome org>
- Subject: Another major bug fixed - Slackware users should be happy
- Date: Fri, 6 Jul 2001 13:30:44 -0400 (EDT)
Hello!
If cons.saver cannot open /dev/vcsa* for the current console it falls back
to the old Linux mode (for ancient kernels before 1.1.92). If it doesn't
work, cons.saver tries another mode, for even older kernels. If it
doesn't work either, cons.saver decides that it's not running on a console
and exits.
At this point, MC may have installed a SIGCHLD handler that restarts
cons.saver. The new cons.saver also fails, MC restarts it again and so
on.
I see no reason to restart cons.saver if it exits.
This must be the problem observed on the Slackware systems where
/dev/vcsa* is not readable and cons.saver is not setgid.
By the way, it may be a good idea to remove support for old Linux kernels
in cons.saver.
Support for devfs names, such as /dev/vcc/a*, will be added separately.
Lack of such support may have triggered this bug as well if the
compatibility names are not created by devfs.
ChangeLog:
* main.c (sigchld_handler_no_subshell): Don't restart cons.saver
if it died.
* subshell.c (sigchld_handler): Likewise.
--
Regards,
Pavel Roskin
-------------------------------------------------
2001-07-05 Pavel Roskin <proski gnu org>
--- main.c
+++ main.c
@@ -2426,18 +2426,18 @@ sigchld_handler_no_subshell (int sig)
pid = waitpid (cons_saver_pid, &status, WUNTRACED | WNOHANG);
if (pid == cons_saver_pid){
- /* {{{ Someone has stopped or killed cons.saver; restart it */
-# ifdef SIGTSTP
+#ifdef SIGTSTP
if (WIFSTOPPED (status))
+ /* Someone has stopped cons.saver - restart it */
kill (pid, SIGCONT);
else
-# endif
+#endif /* SIGTSTP */
{
+ /* cons.saver has died - disable confole saving */
handle_console (CONSOLE_DONE);
- handle_console (CONSOLE_INIT);
+ console_flag = 0;
}
- /* }}} */
}
#endif /* linux || __linux__ */
--- subshell.c
+++ subshell.c
@@ -897,22 +897,19 @@ void sigchld_handler (int sig)
pid = waitpid (cons_saver_pid, &status, WUNTRACED | WNOHANG);
if (pid == cons_saver_pid) {
- /* {{{ Someone has stopped or killed cons.saver; restart it */
# ifdef SIGTSTP
if (WIFSTOPPED (status))
+ /* Someone has stopped cons.saver - restart it */
kill (pid, SIGCONT);
else
# endif
{
+ /* cons.saver has died - disable confole saving */
handle_console (CONSOLE_DONE);
- handle_console (CONSOLE_INIT);
- /* Ought to do: if (in_subshell) handle_console (CONSOLE_SAVE)
- Can't do this without adding a new variable `in_subshell';
- it hardly seems to be worth the trouble. */
+ console_flag = 0;
}
- /* }}} */
}
#endif /* linux || __linux__ */
/* If we get here, some other child exited; ignore it */
-------------------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]