Menu

#1 libedit does not run in background

open
nobody
None
5
2004-12-23
2004-12-23
Wim Heirman
No

Running a program in the background ($ ./a.out & at
the shell) does not work when libedit is used (the
program goes into suspended state, and cannot be awoken
by kill -CONT). When the same program is compiled with
libreadline this does not happen. I'm using libedit
2.9.cvs.20040827-1 and Linux kernel 2.4.26. I found the
problem by using PHP 4.9, but it can be reproduced
using this test program:

#include <readline/readline.h>

int main(){
using_history();
}

$ gcc test.c -lreadline
$ ./a.out &

# program exists immediately

$ gcc test.c -ledit
$ ./a.out &

# a.out is suspended, attaching gdb to a.out gives this:

(gdb) bt
#0 0x4010a70e in tcsetattr () from /lib/libc.so.6
#1 0x4002d31a in el_gets () from /usr/lib/libedit.so.2
#2 0x4002d454 in el_gets () from /usr/lib/libedit.so.2
#3 0x40024d39 in el_init () from /usr/lib/libedit.so.2
#4 0x400313c0 in rl_initialize () from
/usr/lib/libedit.so.2
#5 0x400318a4 in using_history () from
/usr/lib/libedit.so.2
#6 0x08048499 in main ()

Discussion

  • daniel hahler

    daniel hahler - 2007-12-07

    Logged In: YES
    user_id=663176
    Originator: NO

    The bug appears to have been fixed.

    It has been reported as fixed in Debian (at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286356\) and I could not reproduce the failure mentioned above with 2.9.cvs.20050518-3.

     
  • Raphael Geissert

    Logged In: YES
    user_id=948989
    Originator: NO

    As stated in the Debian bug report, this bug is still present.
    I can reproduce the behaviour with the above mentioned test program.

    I've been able to reproduce the bug with 2.11~20080614 and 2.9.cvs.20050518-4

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.