Bug 31224 - mutt зависает при запуске из cron
Summary: mutt зависает при запуске из cron
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: mutt (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Gleb F-Malinovskiy
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-23 01:53 MSK by Vitaly Lipatov
Modified: 2016-04-25 17:25 MSK (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Lipatov 2015-08-23 01:53:53 MSK
0x000000000041f9ab in mutt_ts_capability () at ../curs_main.c:169
169	    if (term && *termp && mutt_strncasecmp (term, *termp, strlen(*termp)))
(gdb) bt
#0  0x000000000041f9ab in mutt_ts_capability () at ../curs_main.c:169
#1  0x0000000000406b63 in main (argc=2, argv=0x7fff2b163e08) at ../main.c:811


0x000000000041f9d3 in mutt_ts_capability () at ../curs_main.c:167
167	  for (termp = known; termp; termp++)
(gdb) bt
#0  0x000000000041f9d3 in mutt_ts_capability () at ../curs_main.c:167
#1  0x0000000000406b63 in main (argc=2, argv=0x7fff2b163e08) at ../main.c:811

165	  /* Check term types that are known to support the standard escape without
166	   * necessarily asserting it in terminfo. */
167	  for (termp = known; termp; termp++)
168	  {
169	    if (term && *termp && mutt_strncasecmp (term, *termp, strlen(*termp)))
170	      return 1;
171	  }


$ epmqf mutt-default
Note: mutt-default is placed as /usr/bin/mutt-default
 $ rpm -qf /usr/bin/mutt-default
mutt-default-1.5.23.88.hg577987ca2d02-alt1
Comment 1 Vitaly Lipatov 2015-08-23 01:57:02 MSK
(gdb) print known
$2 = {0x49e798 "color-xterm", 0x49e7a4 "cygwin", 0x49e7ab "eterm", 0x49e7b1 "kterm", 0x49e7b7 "nxterm", 0x49e7be "putty", 0x49e7c4 "rxvt", 0x4a41da "screen", 0x49e79e "xterm", 0x0

(gdb) print term
$3 = 0x0

А что, неплохо попасть в этот цикл с term == 0 :)
Comment 2 Vitaly Lipatov 2015-08-23 02:04:07 MSK
> 167      for (termp = known; termp; termp++)
видимо, проверка должна быть с разыменованием termp:
 167      for (termp = known; *termp; termp++)
Comment 3 Dmitry V. Levin 2015-08-23 08:50:07 MSK
У меня, между прочим, не зависает.
Comment 4 Vitaly Lipatov 2015-08-23 17:25:34 MSK
(В ответ на комментарий №3)
> У меня, между прочим, не зависает.
У вас терминал color-xterm? :)

И ещё мне кажется, что там пропущен ! перед mutt_strncasecmp

А так, да, наверняка у меня возвращается null здесь:
tcaps = tigetstr("tsl");
Comment 5 Repository Robot 2016-04-25 17:25:19 MSK
mutt-3:1.6-alt1 -> sisyphus:

* Mon Apr 25 2016 Gleb F-Malinovskiy <glebfm@altlinux> 3:1.6-alt1
- Updated to mutt-1-6-rel (ALT#31943).
- Fixed hang with empty TERM env variable (ALT#31224).