Package: console-tools
Version: 1:0.2.3dbs-60
Severity: normal
Tags: patch

Hi,

There is a fd leak in openvt, so that the following fails:

tty1:$ openvt -c 8
tty8:$ openvt -c 9
tty8:$ exit
tty1:$ openvt -c 8
VT 8 is in use; command aborted

Because the second openvt leaks the fd on /dev/tty (actually /dev/tty8)
Here is a patch.

diff -urN console-tools-orig/vttools/openvt.c 
console-tools-0.2.3/vttools/openvt.c
--- console-tools-orig/vttools/openvt.c 1999-08-31 22:50:12.000000000 +0200
+++ console-tools-0.2.3/vttools/openvt.c        2005-12-16 19:13:41.000000000 
+0100
@@ -189,6 +189,8 @@
          }
       }
 
+  close(fd);
+
   sprintf(vtname, VTNAME, vtno);
 
   /* Can we open the vt we want? */

Regards,
Samuel

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (900, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages console-tools depends on:
ii  console-common             0.7.55        Basic infrastructure for text cons
ii  debconf [debconf-2.0]      1.4.62        Debian configuration management sy
ii  libc6                      2.3.5-8.1     GNU C Library: Shared libraries an
ii  libconsole                 1:0.2.3dbs-60 Shared libraries for Linux console
ii  sysvinit                   2.86.ds1-6    System-V like init

Versions of packages console-tools recommends:
ii  console-data            2002.12.04dbs-52 Keymaps, fonts, charset maps, fall

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to