Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Development (http://www.linux-archive.org/debian-development/)
-   -   abnormal_exit() method that doesn't forget about switching to tty1. (http://www.linux-archive.org/debian-development/349666-abnormal_exit-method-doesnt-forget-about-switching-tty1.html)

Ales Kozumplik 03-31-2010 09:18 AM

abnormal_exit() method that doesn't forget about switching to tty1.
 
On 03/30/2010 08:35 PM, Chris Lumens wrote:



The advantage of this approach is that it's more like what a regular
program would do - we're not putting more special "pretend anaconda's in
a completely different environment" stuff in.




The patch is attached and tested. Can you and Brian and Dave be
convinced that this should also go in f13-branch as a fix for 577380?


Ales
>From 5c6009add13c7f35143278295775238860532c15 Mon Sep 17 00:00:00 2001
From: Ales Kozumplik <akozumpl@redhat.com>
Date: Wed, 31 Mar 2010 11:11:59 +0200
Subject: [f13-branch] init: switch back to tty1 after the installer finishes. (#577380)

---
exception.py | 8 --------
loader/init.c | 4 +++-
2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/exception.py b/exception.py
index 18f8e4e..65d7008 100644
--- a/exception.py
+++ b/exception.py
@@ -89,14 +89,6 @@ class AnacondaExceptionHandler(ExceptionHandler):
pdb.post_mortem (tb)
os.kill(os.getpid(), signal.SIGKILL)

- def runQuit(self, (ty, value, tb)):
- # see a similar comment at runDebug()
- try:
- isys.vtActivate(1)
- except SystemError:
- pass
- sys.exit(self.exitcode)
-
def initExceptionHandling(anaconda):
fileList = [ "/tmp/anaconda.log", "/tmp/lvmout", "/tmp/resize.out",
"/tmp/program.log", "/tmp/storage.log", "/tmp/yum.log",
diff --git a/loader/init.c b/loader/init.c
index ec4ce73..8160ae3 100644
--- a/loader/init.c
+++ b/loader/init.c
@@ -770,8 +770,10 @@ int main(int argc, char **argv) {
pid_t childpid;
childpid = waitpid(-1, &waitStatus, 0);

- if (childpid == installpid)
+ if (childpid == installpid) {
doShutdown = 1;
+ ioctl(0, VT_ACTIVATE, 1);
+ }
}

if (!WIFEXITED(waitStatus) ||
--
1.6.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 11:30 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.