Re: slrn hangs in infinite loop if terminal dies

Jörg Sommer <[email protected]>
Newsgroups gmane.network.slrn.user
Message-ID <[email protected]>
Hallo John,

"John E. Davis" <[email protected]> wrote:
> Jörg Sommer <[email protected]> wrote:
>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=450845
>
> This bug report pertains to version 0.9.8.1pl1-28.  With pre0.9.9, I
> am unable to reproduce the problem.

Oh, I can reproduce it.

#v+
% slrn --version
slrn pre0.9.9-87
        * Hinweis: Dies ist eine Vorab-Version für Programmentwickler.
Version der S-Lang-Bibliothek: 2.1.3
Kompilierdatum: Mar  3 2008 19:21:06
Betriebssystem: Debian

COMPILE TIME OPTIONS:
 Backends: +nntp +slrnpull +spool
 External programs / libs: +canlock +inews -ssl -uudeview +iconv
 Features: +decoding +emphasized_text +end_of_thread +fake_refs +gen_msgid
    -grouplens -msgid_cache +piping +rnlock +spoilers -strict_from

DEFAULTS:
 Default server object:     nntp
 Default posting mechanism: nntp
#v-

#v+
#0  0x0fd5916c in sigprocmask () from /lib/libc.so.6
#1  0x0ff76930 in ?? () from /lib/libslang.so.2
#2  0x0ff76c5c in ?? () from /lib/libslang.so.2
#3  0x0ff04f3c in ?? () from /lib/libslang.so.2
#4  0x0ff1b76c in ?? () from /lib/libslang.so.2
#5  0x0ff1c86c in SLang_set_error () from /lib/libslang.so.2
#6  0x10057acc in slrn_do_keymap_key (map=0x100cd558)
    at /home/joerg/git/debian/slrn/src/slrn.c:1615
#7  0x10057ed0 in main (argc=5, argv=0xbf904784)
    at /home/joerg/git/debian/slrn/src/slrn.c:1734
#v-

#v+
#0  0x0fd59170 in sigprocmask () from /lib/libc.so.6
(gdb) l
1729            if (SLang_get_error() || !SLang_input_pending(0))
1730              {
1731                 slrn_update_screen ();
1732              }
1733
1734            slrn_do_keymap_key (Slrn_Current_Mode->keymap);
1735         }
1736
1737       return 1;
1738    }
(gdb) up
#1  0x0ff76930 in ?? () from /lib/libslang.so.2
(gdb) l
1739
1740    /*}}}*/
1741
1742    /*}}}*/
1743
1744    int slrn_posix_system (char *cmd, int reset) /*{{{*/
1745    {
1746       int ret;
1747       int init_mode = Slrn_TT_Initialized;
1748
(gdb) up
#2  0x0ff76c5c in ?? () from /lib/libslang.so.2
(gdb) l
1749       if (reset) slrn_set_display_state (0);
1750       ret = SLsystem (cmd);
1751       if (reset) slrn_set_display_state (init_mode);
1752       Slrn_Full_Screen_Update = 1;
1753       return ret;
1754    }
1755
1756    /*}}}*/
(gdb) up
#3  0x0ff04f3c in ?? () from /lib/libslang.so.2
(gdb) l
Line number 1757 out of range; /home/joerg/git/debian/slrn/src/slrn.c has 1756 lines.
(gdb) up
#4  0x0ff1b76c in ?? () from /lib/libslang.so.2
(gdb) l
Line number 1757 out of range; /home/joerg/git/debian/slrn/src/slrn.c has 1756 lines.
(gdb) up
#5  0x0ff1c86c in SLang_set_error () from /lib/libslang.so.2
(gdb) l
Line number 1757 out of range; /home/joerg/git/debian/slrn/src/slrn.c has 1756 lines.
(gdb) up
#6  0x10057acc in slrn_do_keymap_key (map=0x100cd558)
    at /home/joerg/git/debian/slrn/src/slrn.c:1615
1615       SLang_set_error (0);
(gdb) l
1610         {
1611            if (SLang_get_error()) SLang_restart (0);
1612            slrn_clear_message ();
1613         }
1614       SLKeyBoard_Quit = 0;
1615       SLang_set_error (0);
1616       
1617       if ((key == NULL) || (key->type == 0))
1618         {
1619            SLtt_beep ();
(gdb) up
#7  0x10057ed0 in main (argc=5, argv=0xbf904784)
    at /home/joerg/git/debian/slrn/src/slrn.c:1734
1734            slrn_do_keymap_key (Slrn_Current_Mode->keymap);
(gdb) l
1729            if (SLang_get_error() || !SLang_input_pending(0))
1730              {
1731                 slrn_update_screen ();
1732              }
1733
1734            slrn_do_keymap_key (Slrn_Current_Mode->keymap);
1735         }
1736
1737       return 1;
1738    }
(gdb) finish
Run till exit from #0  0x0ff1c86c in SLang_set_error () from /lib/libslang.so.2
slrn_do_keymap_key (map=0x100cd558)
    at /home/joerg/git/debian/slrn/src/slrn.c:1617
1617       if ((key == NULL) || (key->type == 0))
(gdb) l
1612            slrn_clear_message ();
1613         }
1614       SLKeyBoard_Quit = 0;
1615       SLang_set_error (0);
1616       
1617       if ((key == NULL) || (key->type == 0))
1618         {
1619            SLtt_beep ();
1620            return;
1621         }
(gdb) n
1619            SLtt_beep ();
(gdb) n
1648    }
(gdb) n
main (argc=5, argv=0xbf904784) at /home/joerg/git/debian/slrn/src/slrn.c:1719
1719       while (Slrn_Current_Mode != NULL)
(gdb) n
1721            if (SLKeyBoard_Quit)
(gdb) n
1727            (void) slrn_handle_interrupts ();
(gdb) n
1729            if (SLang_get_error() || !SLang_input_pending(0))
(gdb) n
1734            slrn_do_keymap_key (Slrn_Current_Mode->keymap);
(gdb) n
1719       while (Slrn_Current_Mode != NULL)
(gdb) n
1721            if (SLKeyBoard_Quit)
(gdb) n
1727            (void) slrn_handle_interrupts ();
(gdb) n
1729            if (SLang_get_error() || !SLang_input_pending(0))
(gdb) n
1734            slrn_do_keymap_key (Slrn_Current_Mode->keymap);
(gdb) n
1719       while (Slrn_Current_Mode != NULL)
(gdb) n
1721            if (SLKeyBoard_Quit)
(gdb) n
1727            (void) slrn_handle_interrupts ();
(gdb) n
1729            if (SLang_get_error() || !SLang_input_pending(0))
(gdb) n
1734            slrn_do_keymap_key (Slrn_Current_Mode->keymap);
(gdb) n
1719       while (Slrn_Current_Mode != NULL)
#v-

Schöne Grüße, Jörg.
-- 
“Hey, dad, you see how this man can twist his fingers? Amazing, isn't
it?” “No, son, not really. He's been using Emacs for ten years…”

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.