[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#737491: eterm: takes 100% CPU time



Package: eterm
Version: 0.9.6-1
Followup-For: Bug #737491

Dear Maintainer,

The issue is the following :
in command.c : get_tty(void) :
[...]
 /*
     * Close all file descriptors.  If only stdin/out/err are closed,
     * child processes remain alive upon deletion of the window.
     */
    {
        unsigned short i;
        unsigned long max_fds;

[...]
max_fds = sysconf(_SC_OPEN_MAX);
[...]
        for (i = 0; i < max_fds; i++) {
            if (i != fd)
                close(i);
        }

On my system, max_fds is 65536 =>for loop indefinitly.

I solve the issue by changing i type to unsigned long

Have a nice day.

CG.




-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages eterm depends on:
ii  libast2            0.7-6+b1
ii  libc6              2.19-10
ii  libfreetype6       2.5.2-1.1
ii  libice6            2:1.0.9-1
ii  libimlib2          1.4.6-2
ii  libsm6             2:1.2.2-1
ii  libx11-6           2:1.6.2-3
ii  libxext6           2:1.3.2-1
ii  multiarch-support  2.19-10
ii  zlib1g             1:1.2.8.dfsg-1

eterm recommends no packages.

eterm suggests no packages.

-- no debconf information


Reply to: