[Lsb-messages] /var/www/bzr/lsb/devel/distribution-checker r66: Force the terminal type to "linux".

Jeff Licquia licquia at linuxfoundation.org
Tue May 1 18:45:38 UTC 2012


------------------------------------------------------------
revno: 66
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: distribution-checker
timestamp: Tue 2012-05-01 14:45:38 -0400
message:
  Force the terminal type to "linux".
  
  Inheriting the terminal type from whatever terminal we started from is
  almost certainly wrong.  We are responsible for interpreting any
  "interesting" terminal responses, so we should set the terminal type
  to something we can understand.
  
  For now, "linux" is probably a good bet, but we might need to revisit if
  we actually get "interesting" terminal results back from a test.  Or,
  we might need to teach Dist Checker how to interpret those results.
  
  For bug 3348.
modified:
  ptyshell/subshell.c
-------------- next part --------------
=== modified file 'ptyshell/subshell.c'
--- a/ptyshell/subshell.c	2009-07-29 15:57:36 +0000
+++ b/ptyshell/subshell.c	2012-05-01 18:45:38 +0000
@@ -261,11 +261,6 @@
     pty_master_fd = -1;
     subshell_pid = (pid_t) -1;
 
-    /* Remember the TERM environment variable; it will be passed
-     * to the subshell.
-     */
-    const char * env_term = getenv("TERM");
-
     /* Get information about the target user. */
     struct passwd * user_data = getpwuid(user_id);
     if (user_data == NULL) {
@@ -366,7 +361,7 @@
     if (subshell_pid == 0) {
 
         /* This code is executed in the subprocess. */
-        subshell_worker(user_id, group_id, user_name, user_home, env_path, slave_tty, env_term);
+        subshell_worker(user_id, group_id, user_name, user_home, env_path, slave_tty, "linux");
         exit(127);
     }
 



More information about the lsb-messages mailing list