FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 03-22-2012, 12:37 PM
Vratislav Podzimek
 
Default We have to return tty's control to init's process group at exit

Resolves: rhbz#747219
---
anaconda | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/anaconda b/anaconda
index 945b7e8..170bc3f 100755
--- a/anaconda
+++ b/anaconda
@@ -30,7 +30,7 @@

# This toplevel file is a little messy at the moment...

-import sys, os, re, time, subprocess
+import sys, os, re, time, subprocess, atexit
from optparse import OptionParser
from tempfile import mkstemp

@@ -38,6 +38,9 @@ from tempfile import mkstemp
wm_pid = None
xserver_pid = None

+def return_tty(fd, pgrp_id):
+ os.tcsetpgrp(fd, pgrp_id)
+
# Make sure messages sent through python's warnings module get logged.
def AnacondaShowWarning(message, category, filename, lineno, file=sys.stderr, line=None):
log.warning("%s" % warnings.formatwarning(message, category, filename, lineno, line))
@@ -605,6 +608,10 @@ class Anaconda(object):
return []

if __name__ == "__main__":
+ # Register atexit function before anything bad can happen
+ # We have to return tty control back to init's process group
+ atexit.register(return_tty, sys.stdin.fileno(), os.getpgid(os.getppid()))
+
anaconda = Anaconda()

setupPythonPath()
--
1.7.4.4

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

Thread Tools




All times are GMT. The time now is 12:45 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org